Coder Social home page Coder Social logo

ibraam-nashaat / arithmetic-logic-unit Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 171 KB

ALU capable of adding, subtracting, multiplying and calculating the remainder of two signed 3-bits numbers.

alu arithmetic-logic-unit logic-unit arithmetic-units

arithmetic-logic-unit's Introduction

Arithmetic-Logic-Unit

  • This project was done during Fall 2021 semester as a project of Logic Design course (CMP1010).

Introduction :

  • ALU is capable of adding, subtracting, multiplying and calculating the remainder of two signed numbers and displays the result of the operation performed along with some additional flags regarding the operation and the result on seven segments.

Note: All the files in ALU folder was made using Logisim program so you need to download it to be able to open these files.

Block Diagram :

  • ALU takes two 3-bits signed inputs A and B and an additional input called mode of operation which is 2-bits to inform the ALU which function to perform on A and B. It outputs 5-bits and 3 flags. the first four bits of the output represents the output number which would be decoded and displayed on seven segments and the 5th bit represents the sign of the output which would be displayed on another separate seven segments.

Flags :

  • ALU outputs 3 flags which are :
  1. Sign Flag :
    • The sign flag indicates if the result is negative. The flag is set to 1 if the result is negative and 0 otherwise.
  2. Zero Flag:
    • The zero flag indicates if the result is zero. The flag is set to 1 if the result is zero and 0 otherwise.
  3. Divide by Zero Flag :
    • The divide by zero flag indicates if we divide by zero. The flag is set to 1 if B operand equal zero in division operation and 0 otherwise.

Operations:

1. Adding and Subtracting :

  • Adding or Subracting A and B where each of them is 3-bits and the mode of operation is determined using the selector bit where 0 represents addition and 1 represents subtraction.

2. Multiplication :

3. Remainder :

Full Circuit :

  • This is the integrated circuit which performs all the operations.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.