alu project(segma team)

66

Upload: mohamed-seif

Post on 25-May-2015

2.187 views

Category:

Technology


0 download

DESCRIPTION

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

TRANSCRIPT

Page 1: ALU project(segma team)
Page 2: ALU project(segma team)

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.

Page 3: ALU project(segma team)

Preface

The ALU in our project can do four main operations:

Page 4: ALU project(segma team)

Topics

Page 5: ALU project(segma team)

Designs of the circuits

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

Page 6: ALU project(segma team)

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.

Page 7: ALU project(segma team)

Designs of the circuits

Distribution concept:

Page 8: ALU project(segma team)

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.

Page 9: ALU project(segma team)

Designs of the circuits

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

Page 10: ALU project(segma team)

Designs of the circuits

We connected the kits each other with data cables .

Page 11: ALU project(segma team)

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

Page 12: ALU project(segma team)

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.

Page 13: ALU project(segma team)

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.

Page 14: ALU project(segma team)

Input Kit

Page 15: ALU project(segma team)

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

Page 16: ALU project(segma team)

Logic kits

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

input data bits respectively.

Page 17: ALU project(segma team)

Logic Kit

Schematic : Circuit 1:

Page 18: ALU project(segma team)

Logic Kit

How To Use :Functional truth table for circuit 1

Operation M1 M2

AND 0 0NANDب 0 1

OR 1 1NOR 1 0

Page 19: ALU project(segma team)

Logic Kit

Circuit 2 :

Page 20: ALU project(segma team)

Logic Kit

How to use :Functional truth table for circuit 2

Operation M B

XNOR 0 XXXX

XOR 1 XXXX

Invert 1 0000

Page 21: ALU project(segma team)

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

Page 22: ALU project(segma team)

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.

Page 23: ALU project(segma team)

Arithmetic Kit

Schematic :

Page 24: ALU project(segma team)

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

Page 25: ALU project(segma team)

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.

Page 26: ALU project(segma team)

Multiplication & Division Kit

Schematic:Circuit 1

Page 27: ALU project(segma team)

Multiplication & Division Kit

Circuit 2:

Page 28: ALU project(segma team)

Multiplication & Division Kit

Page 29: ALU project(segma team)

Multiplication & Division Kit

Page 30: ALU project(segma team)

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.

Page 31: ALU project(segma team)

BCD,excess-3 Addition

Schematic:

Page 32: ALU project(segma team)

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

Page 33: ALU project(segma team)

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.

Page 34: ALU project(segma team)

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

Schematic:Circuit 1:

Page 35: ALU project(segma team)

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

How to use:

Operation Switch

Converting to BCD 0

Converting to Exc-3 1

Page 36: ALU project(segma team)

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.

Page 37: ALU project(segma team)

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

Circuit 2:

Page 38: ALU project(segma team)

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

How to use:

Operation Switch

Converting to BCD 0

Converting to Exc-3 1

Page 39: ALU project(segma team)

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.

Page 40: ALU project(segma team)

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.

Page 41: ALU project(segma team)

Gray Code & Negation Kit

Schematic:

Page 42: ALU project(segma team)

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.

Page 43: ALU project(segma team)

Gray Code & Negation Kit

Schematic:

Page 44: ALU project(segma team)

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.

Page 45: ALU project(segma team)

Gray Code & Negation Kit

Schematic :

Page 46: ALU project(segma team)

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

Page 47: ALU project(segma team)

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.

Page 48: ALU project(segma team)

Shifting Kit

Schematic:

Page 49: ALU project(segma team)

Shifting Kit

How to use :

Operation S0 S1

Load 0 0store 0 1

Shift right 1 0Shift left 1 1

Page 50: ALU project(segma team)

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

Page 51: ALU project(segma team)

PCB Designs

We used the altium software in the PCB designs .

Page 52: ALU project(segma team)

PCB Designs

PCB designs before the implementation

Input kit :

Page 53: ALU project(segma team)

PCB Designs

Logic kit :

Page 54: ALU project(segma team)

PCB Designs

Arithmetic kit:

Page 55: ALU project(segma team)

PCB Designs

Mutiplication&division kit: Multiplication

Page 56: ALU project(segma team)

PCB Designs

Division

Page 57: ALU project(segma team)

PCB Designs

BCD/Ex-3 Addition:

Page 58: ALU project(segma team)

PCB Designs

Conversion kit:

Page 59: ALU project(segma team)

PCB Designs

Gray code & negation: Gray to bin & vice versa

Page 60: ALU project(segma team)

PCB Designs

Negation :

Page 61: ALU project(segma team)

PCB Designs

Comperator (general circuit)

Page 62: ALU project(segma team)

PCB Designs

Implementing in PCB

We had two options to implement these cicuits:

Single layer Double layer.

Page 63: ALU project(segma team)

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.

Page 64: ALU project(segma team)

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.

Page 65: ALU project(segma team)

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.

Page 66: ALU project(segma team)