Digital Electronics
Tutorial Sheet 7
1.* What values do the following numbers have if they are (a) unsigned and (b)
signed?
0101
1101
1111
00100000
11011111
01111110
10000000
2.** Explain why the method presented in the lectures for negating a signed
number fails for the maximum negative number in a 2's complement system.
3.* Design a half adder using only NAND gates
4.* Design a full adder using 2 half adders and an OR gate.
5.** Construct the truth table for a 7 segment display decoder to display the hex
character set 0, 1, 2, ..., F.
6.** What is the range of possible results from (a) adding and (b) multiplying two
N-bit signed numbers? How many bits are required to represent the answer in
each case?
7.** There exists an alarm clock made in the shape of a cube whose alarm is turned
off by turning the whole clock upside-down. When you do this, the time
display also inverts itself so that you can still read the time.
Using the standard circuits you have met in lectures, design the circuitry
needed to display one of the digits on a seven-segment display. The inputs to
your circuit are a control signal INVERT and a four bit number X3:0 in the
range 0 to 9. (The notation X3:0 denotes a 4-bit signal comprising X3, X2, X1
and X0 in which X3 is the MSB). The digit should be the normal way up if
INVERT=0 and upside down if INVERT=1. You will need to use a seven
segment decoder and a multiplexer or two; their logic symbols are shown
below and you should ensure that all inputs are connected appropriately.
When the ENABLE input of the multiplexer is high, the circuit is disabled and
all four outputs are forced low.
What would happen in your circuit if you connected the multiplexer ENABLE
inputs to a 100 Hz square wave whose duty cycle could be varied from 0% to
100%? (The duty cycle of a square wave is the faction of time that it is at a high
level.)
74LS157
SELECT G1
ENABLE EN
a
BIN/7SEG
2 MUX X3 (MSB) a a
1 4 8 b b f b
3 1 X2 4 c c g
5 X1 2 d d
6 7 X0 e e
1 f f
11 9 g g e c
10
14 12
13 d
8.*** Design a circuit to multiply a binary number by (45)10 .
9.*** Design a circuit to give the absolute value of its 4-bit signed input X3:0.