# digital electronic Lab

EET 205
Digital Electronics

Lab # 3
Arithmetic Operations

“I have been asked … ‘If you put into the machine wrong figures, will the right answers come out?’ I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.”
–Charles Babbage

Objectives:
To understand the combinatorial logic used in arithmetic functions.

WARNING! MAKE SURE ALL YOUR INPUTS ARE SET TO +5V OR TTL. USING ANYTHING HIGHER WILL GET YOUR CHIPS VERY UPSET!

WARNING 2! YOU WILL BE USING CMOS INTEGRATED CIRCUITS IN THIS LAB. THESE DEVICES ARE STATIC SENSITIVE – YOU MUST USE A GROUND STRAP WHEN HANDLING THESE COMPONENTS!

Exercise 1. Two-bit Adder from Discrete Components
Build the 2-bit adder with carry that we covered in lecture. Connect the inputs to logic switches and try every combination of inputs A1A0 and B1B0. Do you get the right answers?
(Remember, A1 and B1 are the 2s’ place of each number; A0 and B0 are the 1s’.)

Here’s a block diagram of the circuit:

Exercise 2. Two’s Complement Engine
Build a two’s complement engine. Here’s how you do it: set B1B0 = 01. Then use a 7404 inverter to complement the bits of the number A1A0 and connect the outputs to the A-input of your adder. Now you are complementing the number and adding 1, which is the prescription for generating the two’s complement. Try several numbers, but first calculate the two’s complement of the input to see if you get it right.

Here’s the block diagram:

Exercise 3. Subtraction Engine
Wire up a second 2-bit adder and connect the output of your two’s complement engine to one input and connect two logic switches to the other input. You can now subtract one number from another. Try it with several combinations, but do the arithmetic for yourself first.

Here’s the block diagram. Note that the carry is now a borrow.