BEEE - Unit-6 - Digital Electronics
BEEE - Unit-6 - Digital Electronics
Unit-6
DIGITAL
DIGITAL ELECTRONICS
ELECTRONICS
1’s Complement Subtraction, If M>N
Subtract (1010)2 from (1111)2
1 1 1 1 15 1 1 1 1
- 1 0 1 0 -10 1’s complement of 1010 ➡ + 0 1 0 1
result ➡ 1 0 1 0 0
0 1 0 1 5 Add Carry ➡ 1
Final result ➡ 0 1 0 1
1 0 1 0 10 1 0 1 0
- 1 1 1 1 -15 1’s complement of 1111 ➡ + 0 0 0 0
result ➡ 1 0 1 0
- 0 1 0 1 -5 No Carry is generated, the result in 1’s
complement form
1’s comp of 1010➡ -0 1 0 1
1 1 1 1 15 1 1 1 1
- 1 0 1 0 -10 2’s complement of 1010 ➡ + 0 1 1 0
result ➡ 1 0 1 0 1
0 1 0 1 5 Ignore Carry ➡
Final result ➡ 0 1 0 1
1 0 1 0 10 1 0 1 0
- 1 1 1 1 -15 2’s complement of 1111 ➡ + 0 0 0 1
result ➡ 1 0 1 1
- 0 1 0 1 -5 No Carry is generated, the result in 2’s
complement form
2’s comp of 1011➡ -0 1 0 1
0R
Basic Electronics Engineering Unit-II Ms. M. DIVYA Dept of ECE, REC
AND gate Input Input Output
A B AB
0 0 0
0 1 0
1 0 0
The output of AND gate is low, if
any one input is low or all the 1 1 1
0 0 0
0 1 1
The output of an OR gate is high if any
1 0 1
one input is high or all inputs are high
1 1 1
and is low if all the inputs are low.
0 1
Z = (A . B) Z = A + B
0 0 1
0 1 1
1 0 1
1 1 0
Z = (A + B) Z = A . B
0 0 1
0 1 0
1 0 0
1 1 0
0000
0 1111 9
0001
1 1110 8
0010
2 1101 7
0011
3 1100 6
0100
4 1011 5
D5 P4 D4 D3 D2 P3 D1 P2 P1
9 8 7 6 5 4 3 2 1
For P1: The bit locations 3, 5, 7, 9, 11 have three-1’s or odd number of 1’s.
Therefore P1 = 1.
For P2: The bit locations 3, 6, 7, 10, 11 have three-1’s or odd number of 1’s.
Therefore P2 = 1.
For P3: The bit locations 5, 6, 7 have two-1’s or even number of 1’s.
Therefore P3 = 0.
For P4: The bit locations 9, 10, 11 have three-1’s or odd number of 1’s.
Therefore P4 = 1.
Bit D7 D6 D5 P4 D4 D3 D2 P3 D1 P2 P1
designation
Bit location 11 10 9 8 7 6 5 4 3 2 1
Binary
location
1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001
Number
Information 1 1 1 0 1 1 0
bits (Dn)
Parity bits 1 0 1 1
(Pn)
2. If C ≠ 0 and P5= 1
P5 checks the bit locations from 1 to 11
A single bit error occurred that can be
detected and corrected.
3. If C ≠ 0 and P5= 0
Adder:
Adder is used to add the bits of information.
Half-Adder:
A combinational logic circuit that performs the addition of two data bits A and B is called half adder. Addition
will result in two output bits; one of which is the sum bit S, and the other is the carry bit Cout. The Boolean
functions describing the half adder are:
𝑆=𝐴 𝐵
𝐶out = 𝐴.B
Logic Symbol:
Truth Table:
Inputs Outputs
A B S Cout
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Logic Diagram:
Full Adder:
The half-adder does not take the carry bit from its previous stage into account. The carry bit from its previous
stage is called carry-in bit, Cin. A combinational logic circuit that adds two data bits A and B, and a carry-in
bit Cin is called a full-adder. Addition in this adder will result in two output bits; one of which is the sum S,
and the other is the carry out Cout. The Boolean functions describing for full-adder are:
𝑆=𝐴 𝐵 𝐶𝑖𝑛
𝐶𝑜𝑢𝑡 = 𝐴.𝐵 + 𝐵.𝐶𝑖𝑛 + 𝐴.𝐶𝑖𝑛
or
𝐶𝑜𝑢𝑡 = (𝐴 𝐵).𝐶𝑖𝑛 + 𝐴.B
Logic Symbol:
Truth Table:
Inputs Outputs
A B Cin S Cout
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Logic Diagram:
Block Diagram:
Full Adder using two Half Adders:
Register: A group of flip flops can bre used to store a
word is called Register. A flip flop can store 1-bit of
information. so an n-bit register has a group of n-flip flops
and is capable of storing any binary information contain-
ing n-bits.