Giter Club home page Giter Club logo

abd-elrahmanhamza / alu Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 4.0 1.33 MB

Design and implementation an arithmetic unit that is capable of adding, subtracting, and multiplying two signed magnitude numbers, and displays the result of the operation performed along with some additional flags regarding the operation and the result using Logisim.

License: MIT License

logic-gates digital-design block-diagram logic-circuits logic-circuit-design

alu's Introduction

ALU

Contributors

Abdelrahman Mohamed Asmaa Adel Ziad Sherif Zeyad Tarek

Description

  • Design and implementation an arithmetic unit that is capable of adding, subtracting and multiplying two signed magnitude numbers, and displays the result of the operation performed along with some additional flags regarding the operation and the result using Logisim.

  • The arithmetic unit takes two 5-bits signed magnitude inputs, A and B, and an additional input called Mode of Operation, which informs the arithmetic unit which function to perform on A and B:

    • Addition: Result = A + B

      During the addition A, B and Result are all 6-bits signed numbers.

    • Subtraction: Result = A - B

      During the subtraction A, B and Result are all 5-bits signed numbers.

    • Multiplication: Result = A * B

      During the multiplication A and B are 5-bits signed number and Result is 9-bits signed number. The multiplication of 4-bits by 4-bits yields a result of 8-bits, therefore Result is composed of 8-bits for the value and 1-bit for the sign.

    • Division: Result = A / B

      During the division A, B and Result are all 5-bits signed numbers. Our division is integer division, so we neglect the fraction part of the result.

  • Flags

    • 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.

    • 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.

    • Div 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.

  • Notes

    • The outputs (Result and sign flag should be displayed on 3 seven segments and the other outputs should be displayed on leds)
    • The input can be entered through switches
    • You need to implement circuit which can be used to convert from BCD to seven segments, you can use it in converting result to be displayed on seven segments.
    • You need to implement circuit which convert from binary to BCD

Selectors

Selector operation
00 Addition
01 Subtraction
10 Division
11 Multiplication

Some inputs and outputs:

5 + 3 = 8

figure2

5 - 3 = 2

figure3

15 / -6 = -2

figure4

15 * -6 = -90

figure5

Block diagrams & circuits: -

Addition and subtraction

Addition_subtraction1

Addition_subtraction2

Addition_subtraction3

Division

Division1

Division2

BCD to 7-segments Display

7segments_display

BCD_to_7seg

BCD_to_7seg2

Multiplication

Multiplication1

Multiplication2

Multiplication3

Binary_to_BCD

Binary_to_bcd

Shift_add_3

Binary_to_bcd2

alu's People

Contributors

abd-elrahmanhamza avatar zeyadtarekk avatar

Watchers

 avatar  avatar

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.