You are on page 1of 7

Q: What is ALU

ALU is a popular vegetable in urdu . It is normally use for making


paratahas , chips samosas.

ALU is also describe as a expression of problem. For example if a


student get bad marks in a test , he may say , oh. ALU ho gaya

ALU was also the nick name of a famous cricketer , inzimam.

How ever in DLD ALU stands for Arithmetic Logic Unit

In Logic Design ALU is combination of two circuits , arithmetic


circuits and logic circuits .
Arithmetic circuits carries out mathematical functions where as Logic
circuits carries out Logic function (And or Xor , Xnor etc)

Arithmetic Circuit

The Basic of Component of Arithmetic circuit is Adder. An Adder can


perform all basic functions of Processor. Lets have a look into them

Lets say we have the following adder

Where A and B are in put and F is out put

For the following condition write down the values of different variables

Implement F= A + B
A(Ao,A1)
Ao,A1

B(Bo,B1)
Bo,B1

Cin
0

Cout
Can be 0 or 1

F equation
F= A+B

Cin

Cout

F equation

Cin

Cout

F equation

Implement F=A+B+1
A(Ao,A1)

B(Bo,B1)

Implement F=A+B
A(Ao,A1)

B(Bo,B1)

Implement F=A+B+1
A(Ao,A1)

B(Bo,B1)

Cin

Cout

F equation

Cin

Cout

F equation

Cin

Cout

F equation

Implement F=A
A(Ao,A1)

B(Bo,B1)

Implement F=A+1
A(Ao,A1)

B(Bo,B1)

Making Circuits
Lets make a 4 bit Logic Arithmetic Unit

In a logic circuit we will use n adder as the n number of bits circuit is


used
In all adders Input A will go directly (In our case we will give 4 inputs
of A A1,A2,A3,A4)
All the B inputs (B1,B2,B3,B4) will be given after passing each B
individual input the input from following circuit

Now Draw A Four Bit Logic Circuit.


Some Basic Circuit is Drawn. Complete the rest

Using the above diagram , choose the right answers


Choose the right equation , if following values are provided to function
select and Y input. List if equation is also given below

Function Select

Y Value (B)

So

S1

Cin

All 1s

F=A-1

All 1s

F=A

Equation Table
F=A+1
F=A
F=A+B
F=A+B
F=A+B+1
F=A+B+1
Logic Circuit

Equation

For Logic Circuit , lets recap MUX . Complete the following table for
Mux

So

S1

F (write expression)

1
1
2

0
1
0

Now using a mux and gates (or , Xor , And , Not) provide circuit for the
table

S0 S1- F
0

0 A+B

1 A xor B

0 A .B

Now using a mux and gates (or , , And , Not) provide circuit for the
table

S0 S1- F
0

0 A+B

1 A xor B

0 A .B

ALU. Finally now we can make our ALU. An Alu is a simple circuit that is
implemented by combining both logic design and arithmetic circuit
togather

You might also like