Visvesvaraya Technological University
Jnana sangama, Sabthibastawad road, Machhe
Belagavi-590018, Karnataka, India
Digital Design Computer Organization (BCS302)
Submitted in the partial fulfillment of the requirements for the award
of the degree of BACHELOR OF ENGINEERING in
INFORMATION SCIENCE AND ENGINEERING
For the Academic Year 2024-25
Submitted by-
Name USN Class
NISHANTH M B 1JS23IS103 3-B
Under the Guidance of
Mrs. Sahana V
Assistant Professor, Dept. of ISE, JSSATE-B
DEPARTMENT OF INFORMATION SCIENCE AND
ENGINEERING,
JSS ACAEMY OF TECHNICAL EDUCATION,
UTTARAHALLI, VISHNUVARDHAN ROAD, KENGERI,
BENGALURU-56
1|Page
Table of contents: Page No.
1. Introduction——————————————————3
2. Theory of BCD————————————————3
3. Truth table——————————————————4
4. Logic circuit—————————————————4
5. K-Map———————————————————-5
6. Key elements of BCD———————————-------4
7. Verilog code—————————————————5
8. Simulation graph———————————————-6
9. Reference ———————————————---------8
2|Page
BINARY CODE DECIMAL TO EXCESS-3
• Introduction:
1. To study of binary-coded decimal (BCD) to Excess-3 code and vice versa
conversion.
2. To test the circuit's functionality by converting various BCD numbers to
Excess-3 code.
Theory:
The term BCD refers to representing the ten decimal digits in binary forms; where each
decimal digit is represented by 4-bits. The Excess-3 system is a non-weighted code used
to express decimal numbers.
It is another important binary code which is particularly significant for arithmetic operations
as it overcomes the shortcomings encountered while using the 8421 BCD code to add two
decimal digits whose sum exceeds 9.
The Excess-3 system simply adds 3 to each number to make the codes look different. The
BCD to Excess-3 system is formed by adding 0011 to each BCD value as shown in Table
(1).
BCD to Excess-3 code conversion plays a crucial role in early digital systems. The BCD to
Excess-3 code converter circuit's functionality was achieved through a combination of
logic gates such as AND,OR and NOT.
3|Page
• Truth Table of BCD to Excess-3 Code:
A B C D W X Y Z
0 0 0 0 0 1 1
0
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
• Logic circuit of BCD to Excess-3 code:
Fig 1.0
4|Page
K-map of bcd to Excess-3 code
Fig 2.0
5|Page
Key Elements in the Diagram:
1. Inputs:
o B3,B2,B1,B0: These represent the BCD input bits, where B3 is the most significant bit
(MSB), and B0 is the least significant bit (LSB).
o All inputs are initially set to 0 (OFF in red).
2. Logic Gates:
o Combinations of AND, OR, and NOT gates are used to derive the Excess-3 output bits
(E3,E2,E1,E0) based on specific Boolean expressions.
3. Outputs:
o E3,E2,E1,E0: These represent the Excess-3 code outputs, where E3 is the MSB and E0 is
the LSB.
o In the given state, the outputs are 0011 (green indicators for E1 and E0).
4. Control Buttons:
o Run: Activates the circuit to perform the conversion.
o Clear: Resets the inputs and outputs.
How Excess-3 Works:
Excess-3 code is obtained by adding 3 to the given BCD value: Excess-3 Code=BCD
Value+0011
For the given input
B3=0,B2=0,B1=0,B0=0 (BCD = 0000 in decimal = 0)
Excess-3 = 0000+0011=0011
Thus, the output is E3=0,E2=0,E1=1,E0=1 (0011 in binary).
6|Page
The can be represented by the following logic circuit:
Fig 3.0
· Verilog code for BCD to Excess-3 :
module bcd_ex3_Dataflow(
input a,
input b,
input c,
input d,
output w,
output x,
output y,
output z
);
assign w = (a | (b & c) | (b & d));
assign x = (((~b) & c) | ((~b) & d) | (b & (~c) & (~d)));
assign y = ((c & d) | ((~c) & (~d)));
assign z = ~d;
endmodule
7|Page
Simulation Graph:
Fig 4.0
Reference:-
By eda playground
8|Page