Professional Documents
Culture Documents
Agenda
Practical part:
1. Create (Half & Full) Adder circuit.
CSC201: Digital Logic Design
Level 2 – 1st Semester
Signed Numbers
CSC201: Digital Logic Design
Level 2 – 1st Semester
Sign Numbers:
All number explain before is a (unsigned) numbers.
There are three ways in which signed binary numbers may be expressed:
1. Signed magnitude (SM).
2. One’s complement.
3. Two’s complement.
In signed numbers representation, represent is an 8-bit:
• The sign number is a bit in the 8-bit to the left. Sign (8) Value of the number (0:7)
• The value of the number in the 7 bits to the right.
16 + 8 + 2 + 1 = (-27)10 64 + 2 + 1 = (+67)10
• Example 2:
-13 = 11110011
Complement Digits
13 00001100
2. 1’s Complement:
Find 1’s Complement:
11010 00101
110111 001000
1011011 0100100
2. 1’s Complement:
Determine the decimal value of this signed binary number expressed in 1’s
Complement: (We didn't come with 1’s Complement because the number is already 1’s complement)
Example 1: (1011 0001)2: Example 2: (0110 1110)2:
3. 2’s Complement:
• Example 1: 5 = 00000101
Complement Digits
11111010
+1
Add 1
-5 = 11111011
3. 2’s Complement:
Find 2’s Complement:
3. 2’s Complement:
Determine the decimal value of this signed binary number expressed in 2’s
Complement:
Example 1: (0101 0110)2: Example 2: (1101 0111)2:
Without Carry (-) Do 1’s compliment to the result. Do 2’s compliment to the result.
Practical Part
CSC201: Digital Logic Design
Level 2 – 1st Semester
Adder:
• Adder: in electronics, an adder is a digital circuit that performs the
addition of numbers.
• in modern computers, adders reside in the arithmetic logic unit (ALU).
A Sum (S)
Half Adder
B Carry (C)
Types of Adder:
1. Half Adder.
A
2. Full Adder. Sum (S)
B
Full Adder
Carry Out
Carry in
XOR Circuit:
• Before starting with half adder circuit we have to understand with XOR
Gate.
Half Adder:
• The most basic arithmetic operation is the addition of two binary digits.
• This simple addition consists of four possible elementary operations:
0+0=0
0+1=1
1+0=1
1 + 1 = 10
• Half adder: is a combinational circuit that performs the addition of two bits.
Half Adder:
• Let us consider x and y as the inputs to the half adder as Sum and Carry
are the outputs.
x y Sum Carry
Sum = x . y + x . y = x + y 0 0 0 0
0 1 1 0
XOR Gate
1 0 1 0
1 1 0 1
AND Gate
Half Adder
A Sum Carry
Carry-Out
Half Adder
B
Carry
Full Adder:
• Let us consider x, y and (Carry-in = z) as the inputs to the half adder as
Sum and Carry-out are the outputs. x y z Sum Carry-out
0 0 0 0 0
0 0 1 1 0
Sum = ( x + y)+ z
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
Carry-out = ( x + y)z+xy
1 1 0 0 1
1 1 1 1 1
Truth table for Full adder
Output is the sum of two signals. Output is the sum of three signals.
There are two input and two output terminals. There are three input terminals and two output terminals.
Example: Calculators, computers, digital measuring devices, etc. Example: Multiple bit addition, digital processors, etc.
Any Questions
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Thank You
Eng. Norhan Ahmed