Sie sind auf Seite 1von 7

School of Engineering and Physics

EE222

Lab 3: 1-bit Binary


Addition/Subtraction

Name: Hilda Sikwaae & Rita Iro_____

ID# S11114583 & S11125873____

1
AIM

The aim of this lab is to understand the requirement analysis, logic design,
implementation and testing processes of a 1 bit adder/subtractor.

THEORY

A 1-bit binary addition/subtraction is circuit that is able of subtracting or


adding numbers in binary. It means, the circuit adds and subtract zeros and
ones to give a certain output. A 1-bit binary adder/subtractor accepts five (5)
inputs and generates four (4) outputs. The 5 inputs and 4 input are describe
as follows;

Input
-A, B A and B are the two input binary.
-Cin/Bin Cin is for carry input and Bin is for borrow input.
-X this input controls the signal to indicate whether the circuit implement a
subtraction or an addition.

Output
-Sum/Diff If the X input is zero (0) the circuit will do an addition (B+A), if the
X input is one (1) the circuit will perform a subtraction (B-A).
-Cout/Bout Cout for carry output and Bout for borrow output.

These circuits can be generated from XOR gates, inverters and NAND gates.
These XOR gates, inverters and NAND gates are built in electronic
component known as chips. In order to build a 1-bit adder/subtractor circuit,
an equation must be obtained from the truth table. The equation must be in
a simplified form in order to have and use a less number of gates to decrease
the costs of the circuit.

2
INSTRUMENTS

i) Breadboard.
ii) Power Supply
iii) Multimeter
iv) Function Generator
v) Oscilloscope
vi) Resistors (~100 OHMS).
vii) LEDs.
viii) DIP Switch.
viiii) Chips as shown below

3
METHODOLOGY

Implementation
1. Fill in the truth table below, with X, Cin/Bin, A and B are inputs and
Sum/Diff and cout/bout are outputs.

Table.1 Truth Table

4
2. Fill the k-maps below for both Sum/Diff and Cout/Bout outputs. And
then implement the logic equation in Sum of product (SOP) form
with ANDs, ORs and inverters only, for the two k-maps.

Sum/Diff K-map. Cout/Bout K-


map.

Logic equations for SOP can be generated by grouping all he 1s.

Sum/Diff:
Cout/Bout:

3. Minimize the equations in step (2) using XOR gates

Design
4. Draw the logic of a 1 bit adder/subtractor. State the number of
gates needed and also the integrated circuit.

5. Draw the logic circuit diagram of 1-bit adder/subtractor using only


2-inout NAND gates, XOR gates and inverters. State the number of
gates and integrated circuit needed to implement the circuit.

6. Draw the wiring plan

Testing

7. Construct the wiring plan on a breadboard and show it to the lab


tutor. Test all the 16 inputs combination and compare.

5
DISCUSSION

As shown in table 2, the outputs for the inputs was implemented by adding A
and B and if the output of sum/diff is 1 with a carry input of zero, the
cout/bout will be zero meaning the output does not carry any bit. If the
cout/bout is 1 it means the output borrow a 1. And when the X is 0 it is an
addition and when X is 1 it is a subtraction. And then from the k-map a sum
of product expressions was obtained by noting down the variable that does
not change in the groups on ones. The expression was then simplified using
DeMorgans theorem to get a simplified expression which can use an XOR
gate. The circuit needs 3 XOR gates, 2 NAND gate and 2 inverter circuits.
There were 2 integrated circuits, one for sum/diff and the other wan for
cout/bout. The two IC were then wired together and shared the variable C
(which stands for cin/bin). This is sharing of gates and thus gives one circuit
which can perform the two operations. The gaes were then wired and
constructed on the breadboard. Circuit was built following the plan but it
does not work to verify the results in the truth table in table 1. One of the
testing done was turning all 4 switches on (1), the result from observing the
LED was not the same as calculated in table 2. It turns out the LED did not
glow meaning it is zero (0) which is different from the output in table 2 which
shows that the LED should glow (meaning it is 1). This might due to errors
like the circuit was not properly wired and some wires are worn out.

CONCLUSION

In conclusion, a 1-bit binary adder/subtractor circuit was designed by


analyzing the truth table. The truth table was implemented using the
knowledge of a simple Boolean algebra solving of addition and subtraction.
The circuit was then simplified and connected into an integrated circuit, this
was done to minimize the number of gates to be used. Verification for the
output was not done due to circuit failure when wiring the circuit. Failure of
circuit are due to worn out wires used and also the circuit might not
connected properly. Recommendation for this circuit would be to use new
wires for connection and checked the connections carefully.

6
REFERENCE

Anon, (2017). 1st ed. [ebook] Available at: http://www.c-


jump.com/bcc/c261c/Labs/CIS77_L03.pdf [Accessed 5 Apr. 2017].

Marcovitz, Alan. B, Introduction to Logic Design, 3rd ed., McGraw Hill

Das könnte Ihnen auch gefallen