Lecture-8
Lecture-8
BCD Excess-3
Code Conversion ABCD wxyz
Example 0000 0011
The availability of a large variety of codes for the same discrete
elements of information results in the use of different codes by 0001 0100
different digital systems. It is sometimes necessary to use the output of 0010 0101
one system as the input to another. A conversion circuit must be 0011 0110
inserted between the two systems if each uses different codes for the
0100 0111
same information. Thus, a code converter is a circuit that makes the
two systems compatible even though each uses a different binary code. 0101 1000
We designate the four input binary variables by the symbols A, B, C, 0110 1001
and D, and the four output variables by w, x, y, and 0111 1010
z. The truth table relating the input and output variables is shown in
table . The bit combinations for the inputs and their corresponding 1000 1011
outputs are obtained directly. Note that four binary variables may have 1001 1100
16 bit combinations, but only 10 are listed in the truth table. The six 1010 XXXX
bit combinations not listed for the input variables are don′t-care
1011 XXXX
combinations.
1100 XXXX
1101 XXXX
1110 XXXX
1111 XXXX
07/01/2024
BCD Excess-3
ABCD wxyz
0000 0011
0001 0100
0010 0101
0011 0110
0100 0111
0101 1000
0110 1001
0111 1010
1000 1011
1001 1100
1010 XXXX
1011 XXXX
1100 XXXX
1101 XXXX
1110 XXXX
1111 XXXX
Z = D′
Y = CD + C′D′ = CD + (C+D)′
X = B′C + B′D + BC′D′ = B′(C + D) + B(C+D)′
W = A + BC + BD = A + B(C + D)
07/01/2024
Excess-3 BCD
wxyz ABCD
0000 XXXX Excess-3 to BCD
0001 XXXX
0010 XXXX
0011 0000
0100 0001
0101 0010
0110 0011
0111 0100
1000 0101
1001 0110
1010 0111 Excess-3 to BCD Self study
1011 1000
1100 1001
1101 XXXX
1110 XXXX
1111 XXXX
0 1 0 1 0 1 1 1
0 1 1 0 0 1 0 1 Z= C ⊕ D
0 1 1 1 0 1 0 0
1 0 0 0 1 1 0 0
1 0 0 1 1 1 0 1
07/01/2024
Digit A B C D a b c d e f g
0 0 0 0 0 1 1 1 1 1 1 0
1 0 0 0 1 0 1 1 0 0 0 0
2 0 0 1 0 1 1 0 1 1 0 1
3 0 0 1 1 1 1 1 1 0 0 1
4 0 1 0 0 0 1 1 0 0 1 1
5 0 1 0 1 1 0 1 1 0 1 1
6 0 1 1 0 1 0 1 1 1 1 1
7 0 1 1 1 1 1 1 0 0 0 0
8 1 0 0 0 1 1 1 1 1 1 1
9 1 0 0 1 1 1 1 1 0 1 1
07/01/2024
0111 XXXX
1000 XXXX
1001 1001
1010 XXXX
1011 XXXX
1100 XXXX
1101 XXXX
1110 XXXX
1111 XXXX
Analysis Procedure
The analysis of a combinational circuit requires that we determine the function that the
circuit implements. This task starts with a given logic diagram and culminates with a set
of Boolean functions, a truth table, or, possibly, an explanation of the circuit operation.
The first step in the analysis is to make sure that the given circuit is combinational
and not sequential. The diagram of a combinational circuit has logic gates with no
feedback paths or memory elements. Once the logic diagram is verified to be that of a
combinational circuit, one can proceed to obtain the output Boolean functions or the truth table.
1. Label all gate outputs that are a function of input variables with arbitrary symbols—
but with meaningful names. Determine the Boolean functions for each gate output.
2. Label the gates that are a function of input variables and previously labeled gates
with other arbitrary symbols. Find the Boolean functions for these gates.
3. Repeat the process outlined in step 2 until the outputs of the circuit are obtained.
4. By repeated substitution of previously defined functions, obtain the output Boolean functions in
terms of input variables.
07/01/2024
F 2 = A B + AC + B C
T1 = A + B + C
T2 = ABC
To obtain the truth table directly from the logic diagram without going through the
derivations of the Boolean functions, we proceed as follows:
1. Determine the number of input variables in the circuit. For n inputs, form the 2n possible
input combinations and list the binary numbers from 0 to (2n - 1) in a table.
2. Label the outputs of selected gates with arbitrary symbols.
3. Obtain the truth table for the outputs of those gates which are a function of the input
variables only.
4. Proceed to obtain the truth table for the outputs of those gates which are a function of
previously defined values until the columns for all outputs are determined.
07/01/2024
A B C F2 F2 ′ T1 T2 T3 F1
F 2 = A B + AC + B C
0 0 0 0 1 0 0 0 0 T1 = A + B + C
T2 = ABC
0 0 1 0 1 1 0 1 1
T 3 = F 2′ T 1
0 1 0 0 1 1 0 1 1 F1 = T3 + T2
0 1 1 1 0 1 0 0 0
1 0 0 0 1 1 0 1 1
1 0 1 1 0 1 0 0 0
1 1 0 1 0 1 0 0 0
1 1 1 1 0 1 1 0 1
To pass a particular measure in shareholders meeting need 2/3 of total share vote.
As total number of share is 100. So to pass 66.67 or more share is needed.
A= 30 shares, B =40 shares C= 10 shares D= 20 shares
Truth Table
A B C D Total PASS/FAIL
0 0 0 0 0 0 F
0 0 0 1 20 0 F
0 0 1 0 10 0 F
0 0 1 1 30 0 F
0 1 0 0 40 0 F
0 1 0 1 60 0 F
0 1 1 0 50 0 F
0 1 1 1 70 1 P
1 0 0 0 30 0 F
1 0 0 1 50 0 F
1 0 1 0 40 0 F
1 0 1 1 60 0 F
1 1 0 0 70 1 P
1 1 0 1 90 1 P
1 1 1 0 80 1 P
1 1 1 1 100 1 P
07/01/2024
Truth Table Assume you want to design a car safety alarm system.
D K S B A Remark Consider four input such as door closed (D), key in (K), seat
pressure (S) And seat belt closed (B). The alarm (A) should
0 0 0 0 0 No event
produce sound if the key is in and the door is closed or not
0 0 0 1 0 Seat belt closed close. If the driver is in seat but the seat belt is not closed
0 0 1 0 1 Driver is in seat also make sound an alarm.
Driver is in seat and seat belt 1. 1. Make a proper truth table for this design condition
0 0 1 1 0
closed a) 2. Show the canonical and standard from of SOP
0 1 0 0 1 Key in door not closed expression for output A
0 1 0 1 1 Key in and seat belt closed
0 1 1 0 1 Key in and driver is in seat
Key in, seat belt closed and
0 1 1 1 1
driver is in seat Alarm ON
1 0 0 0 0 Door closed When K=1 and D=1 [KD]
1 0 0 1 0 Door closed and seat belt closed OR
1 0 1 0 1 Door closed, driver is in seat When K=1 and D=0 [KD′]
Door closed, driver is in seat, OR
1 0 1 1 0
seat belt closed
When S=1 and B=0 [SB′]
1 1 0 0 1 Door closed, key is in
Door closed, key is in, seat belt
1 1 0 1 1 A =KD+KD′+SB′
closed
Door closed, key in , driver is in
1 1 1 0 1
seat
Door closed, key in , driver is in
1 1 1 1 1
seat, seat belt closed
Production(P) is ON if there is gas turbine (G) available and demand (D) or there is wind
turbine (W) available and demand (D)
Truth Table
D G W P
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
07/01/2024
The minimal function that can detect “divisible by 2” with 8421 BCD code
Truth Table
A B C D Y Remark
0 0 0 0 1 Divisible by 2
0 0 0 1 0 Not divisible by 2
0 0 1 0 1 Divisible by 2
0 0 1 1 0 Not divisible by 2
0 1 0 0 1 Divisible by 2
0 1 0 1 0 Not divisible by 2
0 1 1 0 1 Divisible by 2
0 1 1 1 0 Not divisible by 2
1 0 0 0 1 Divisible by 2
1 0 0 1 0 Not divisible by 2
1 0 1 0 X Not used
Y=D′
1 0 1 1 X Not used
1 1 0 0 X Not used
1 1 0 1 X Not used
1 1 1 0 X Not used
1 1 1 1 X Not used
The minimal function that can detect “divisible by 3” with 8421 BCD code
Truth Table
A B C D Y Remark
0 0 0 0 1 Divisible by 3
0 0 0 1 0 Not divisible by 3
0 0 1 0 0 Not divisible by 3
0 0 1 1 1 Divisible by 3
0 1 0 0 0 Not divisible by 3
0 1 0 1 0 Not divisible by 3
0 1 1 0 1 Divisible by 3
0 1 1 1 0 Not divisible by 3
1 0 0 0 0 Not divisible by 3
1 0 0 1 1 Divisible by 3
Y=A′B′C′D′+B′CD+BCD′+AD
1 0 1 0 X Not used
1 0 1 1 X Not used
1 1 0 0 X Not used
1 1 0 1 X Not used
1 1 1 0 X Not used
1 1 1 1 X Not used