alu project(segma team)

Post on 25-May-2015

2.187 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

This is our first project presentation at 1st year (faculty of engineering,electrical engineering ,alexandria , egypt)

TRANSCRIPT

ALU Project

Members of the team: Maged Mokhtar

Mohamed Abdella

Mohamed Farghaly

Mohamed Khedr

Mohamed Maghrabi

Mohamed Salem

Mohamed Seif

Mostafa El-said

Nader Nohad

Yehia beltagy.

Preface

The ALU in our project can do four main operations:

Topics

Designs of the circuits

We used a multisim software to simulate the circuits and check it works as we designed or not .

Designs of the circuits

we made separate kits for different operations Including the input kit.

Input kit Logic kit Arithmetic kit Mutiplication&division kit BCD/Ex-3 Addition Conversion kit(BCD/EX-3to bin. And viceversa)

Gray code & negation Shifting.

Designs of the circuits

Distribution concept:

Designs of the circuits

Vcc is only delivered to the circuit that need to be activated only and all input data is delivered to all circuits, by this way only one circuit will be activated and only one output will be produced.

Designs of the circuits

We used a header which contains the GND,Vcc and the inputs .

Designs of the circuits

We connected the kits each other with data cables .

Designs of the circuits

We used a toggle switch A toggle switch inside the kit is used to supply one of the two circuits so as to activate one of them only ,if we have combined circuits in a one kit

Input Kit

Input circuit is responsible of providing all the other circuits with the input data and electrical energy.

A slide switch in the input data is used to supply only one kit with power (VCC) needed to activate circuit's ICs.

Input Kit

Slide switch is easier to be used than the MUX and also it produces an output with any voltage drop across its terminals.

Input Kit

Features : Logic Circuit can do all the logical function required for 2

x 4 input binary numbers. It consists of 2 main circuits :

1. first one can do the ANDing,NANDing,ORing, NORing logic operations.

2. the second part is for XORing, XNORing and Inverting the input data.

A toggle switch inside the circuit is used to supply one of the two circuits so as to activate one of them only.

Logic Kit

Logic kits

The output is represented using LEDs. Each LED represent the logic operation used for the

input data bits respectively.

Logic Kit

Schematic : Circuit 1:

Logic Kit

How To Use :Functional truth table for circuit 1

Operation M1 M2

AND 0 0NANDب 0 1

OR 1 1NOR 1 0

Logic Kit

Circuit 2 :

Logic Kit

How to use :Functional truth table for circuit 2

Operation M B

XNOR 0 XXXX

XOR 1 XXXX

Invert 1 0000

Arithmetic Kit

Features : It’s a one circuit that can do most of binary arithmetic

operations like : Transferring the input data Increment Decrement Addition Addition with carry Subtraction Subtraction with borrow

Arithmetic Kit

The circuit contains of 2 major part: Arithmetic displaying the output( positive and negative)

The circuit contains 3 flags carryout (overflow), negative and carry in flag.

Arithmetic Kit

Schematic :

Arithmetic Kit

How to use:

Operation M1 M2 M3

Transfer 0 0 0

Increment 0 0 1

Addition 0 1 0

Addition with carry

0 1 1

Transfer with over flow

1 0 0

Decrement 1 0 1

Subtraction 1 1 0

Subtraction with borrow

1 1 1

Multiplication & Division Kit

Features: The design depends on the same procedures done to

perform such operations mathematically, successive subtraction or addition.

This Kit consists of two circuits : Multiplication circuit Division circuit.

A toggle switch inside the circuit is used to supply one of the two circuits so as to activate one of them only.

Multiplication & Division Kit

Schematic:Circuit 1

Multiplication & Division Kit

Circuit 2:

Multiplication & Division Kit

Multiplication & Division Kit

BCD,excess-3 Addition

Features: It is a 4 bits adder subtractor, but it's modified to deal

with BCD and Excess-3 inputs.

The circuit can perform BCD addition, subtraction and Excess-3 addition.

It has a sign flag and zero flag. The negative output numbers is expressed in sign magnitude formula.

BCD,excess-3 Addition

Schematic:

BCD,Excess-3 Addition

How to use:

Operation M1 M2

BCD Addition 0 0

BCD subtraction 1 0

Excess-3 Addition 0 1

Not used 1 1

Conversion kit(BCD/Exe-3 to Bin)&vice versa

From BCD, Excess-3 to Binary Features:

To convert from binary to BCD 6 is added generally.

so to convert from BCD to binary 6 is subtracted, id depends on the numbers .

it is easily proven that for 8 bit BCD number, 6*(Second 4 BCD bit) is the subtrahend .

3 is subtracted if the input is a Excess-3 number so as to be converted to BCD.

Conversion kit(BCD/Exe-3 to Bin)&vice versa

Schematic:Circuit 1:

Conversion kit(BCD/Exe-3 to Bin)&vice versa

How to use:

Operation Switch

Converting to BCD 0

Converting to Exc-3 1

Conversion kit(BCD/Exe-3 to Bin)&vice versa

From Binary to BCD, Ecxess-3 Features:

For a 4 bit binary input, it's first converted to BCD then to Excess-3 by adding 3 if needed .

To convert to BCD a check on binary number is made to determine whether it's larger than 9 or not, if it's larger than 9 a 6 is added, if not the input data transfer as it is.

Conversion kit(BCD/Exe-3 to Bin)&vice versa

Circuit 2:

Conversion kit(BCD/Exe-3 to Bin)&vice versa

How to use:

Operation Switch

Converting to BCD 0

Converting to Exc-3 1

Gray Code & Negation Kit

Features:

These two main functions are combined in one kit although they are not relevant.

because they are small circuits and can easily combined in one circuit, a switch on the input VCC is used to activate only the ICs of one circuit, 2 source switches are used for 3 different circuits.

Converting from gray to binary and vice versa , A negation circuit that changes the sign of the input number. Both functions take the same number of input ( 4 bit ) which make it easier to be combined.

Gray Code & Negation Kit

Binary to Gray

A famous circuit is used to convert the number from gray code to binary, it has 4 input and 4 output, which is displayed on a 4 LEDs .

To convert from Gray code to Binary code, we take the MSB as it is, and then add that output with the following bit, adding numbers without consideration of carry can be represented using XOR gates like the schematic, there are no constrains on the input data.

Gray Code & Negation Kit

Schematic:

Gray Code & Negation Kit

Binary to Gray

A Famous circuit is used to convert from binary code to gray code, to convert from binary to gray the MSB in input is the same of the output, to get the next output add the last 2 bits the output is the result without taking the carry in consideration, XOR perform such operation.

Gray Code & Negation Kit

Schematic:

Gray Code & Negation Kit

Negation

Negation is changing the input sign, if positive it's changed to the same magnitude number but with negative sign.

Negation is changing the input sign, if positive it's changed to the same magnitude number but with negative sign.

The circuits contains a sign flag, indication of zero output condition is in the main circuit, a number is entered and then negated using one of the three formulas. The functions are controlled using 2 switches.

Gray Code & Negation Kit

Schematic :

Gray Code & Negation Kit

How to use :

Operation M1 M2

Sign Negation 0 0

Ones Complement 0 1

(increment)Meaningless 1 0

Twos Complement 1 1

Shifting Kit

Features:

There are 3 different types of shifting: ordinary arithmetic (Right - left) circular .

Circuit is designed using sequential logic circuits like D-flip flop and multiplexers .

A carry D-flip flop is used to store the unused bit for only on clock pulse.

Shifting Kit

Schematic:

Shifting Kit

How to use :

Operation S0 S1

Load 0 0store 0 1

Shift right 1 0Shift left 1 1

Shifting Kit

Operation S2 S3

Ordinary shift 0 0Arithmetic shift 0 1

Orbital shift 1 0Un used state 1 1

Operation M

Shifting With Flag 0Shifting Through Flag 1

PCB Designs

We used the altium software in the PCB designs .

PCB Designs

PCB designs before the implementation

Input kit :

PCB Designs

Logic kit :

PCB Designs

Arithmetic kit:

PCB Designs

Mutiplication&division kit: Multiplication

PCB Designs

Division

PCB Designs

BCD/Ex-3 Addition:

PCB Designs

Conversion kit:

PCB Designs

Gray code & negation: Gray to bin & vice versa

PCB Designs

Negation :

PCB Designs

Comperator (general circuit)

PCB Designs

Implementing in PCB

We had two options to implement these cicuits:

Single layer Double layer.

PCB Designs

We preferred that we use the second option (Double Layer) because it reduces the area of kit

, if it was a big one.

But when we implemented the logic circuit we noted that option is too hard due to the Printing inaccurate.

PCB Designs

So we went to the first way (single layer) in implementing some of our PCB designs which it is small circuits (gray code to bin & negation – input kit) .

In the input kit we faced a problem , the slideswitch is not available at the markets ; so we replaced it

with a push button switch.

PCB Designs

In the logic kit there was a problem in LEDthat is not allowed to light in a logic operation. We concluded that there was a noise due to

the narrow tracks and problems in welding.

top related