Beruflich Dokumente
Kultur Dokumente
Task 1.a – Interpret logic circuit diagrams Complete the truth tables for each of the following
logic diagrams
A B C X Y
0 0 0 0 0
0 0 1 0 1
0 1 0 0 0
0A 1B 1C 0X 1Y
10 00 00 00 00
10 00 11 01 11
10 11 00 11 11
10 11 11 10 10
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 0
Task 1.b Complete the logic circuit diagrams for each of the following truth tables.
Truth table 1 Hint: only requires two NOT gates – what is the relationship between X and
A? What is the relationship between Y and B?
X and A represents NOT gate. Since NOT gate have only 1 input (A) and 1 output (X)
when A is 0, X is 1 and when A is 1, X is 0.
A and X represents NOT gate. Since NOT gate have only 1 input (A) and 1 output (X)
when A is 0, X is 1 and when A is 1, X is 0.
While A and B represents AND gate. AND gate have 2 input (A and B) and 1 output (Y).
When both input are 1(A,B=1,1) only then output (Y) is 1.
Truth table 3 (Optional, tricky) Hint: see if there are any relationships between X, Y, and Z
Input X and Y and output Z Input Y and Z and output X Input X and Z and output Y
represents OR gate. represents XOR gate. represents XOR gate.
Task 1.c Create a truth table and logic circuit diagram for each the following situations
• If you see a clown at the circus, it’s ok to stay and watch them. In any other situation, you
should run away from clowns. Create a truth table and logic circuit diagram with two inputs
(do I see a clown, am I at the circus) and one output (should I run away) Tip: make sure your
diagram does not make you run away if you are at the circus but do not see a clown! The
simplest solution uses one AND gate and one NOT gate
So, I should run away only if I see a clown and I am not at circus. Simultaneously, in all other
cases I should not run away.
• If Anna is hungry, and it is lunchtime, and she has brought her lunch with her, she will eat
lunch. Create a truth table and logic circuit diagram with three inputs (hungry, lunchtime,
have food) and one output (should I eat lunch)
So, Anna will have lunch only if she is hungry, its lunchtime and have food with her.
• A hotel room has two lamps, each with an on/off switch. However, there is also a single
main switch which enables the lamps to function. If the main switch is off, the two lamps
won’t work even if their individual switches are on. If the main switch is on, the individual
switches work as normal. Your truth table and diagram should have three inputs (on/off for
each switch) and two outputs (one for each lamp)
So, lamp A and lamp B are on only if respective lamp and main switch is on.
Task 2.b Convert the following decimal numbers to binary (manually!) using either the
divide-by-two method from the lecture, or any other way that makes sense to you. The other
main approach is the subtraction method
•3
2 3
1 1
So answer is 11
•7
2 7
2 3 1
1 1
So answer is 111
•8
2 8
2 4 0
2 2 0
1 0
So answer is 1000
• 12
2 12
2 6 0
2 3 0
1 1 So answer is 1100
• 77
2 77
2 38 1
2 19 0
2 9 1
2 4 1
2 2 0
1 0
So answer is 1001101
Task 2.c Convert the following binary numbers to decimal (manually!). Refer to the powers
of two in the table as required.
28 27 26 25 24 23 22 21 20
25 12 64 32 16 8 4 2 1
6 8
• 10 = 1*21+0*20=2
• 111 = 1*22+1*21+1*20= 4+2+1 = 7
• 1101 = 1*23+1*22+0*21+1*20=8+4+0+1 = 13
• 10110 = 1*24+0*23+1*22+1*21+0*20=16+0+4+2+0 = 22
• 100110 = 1*25+0*24+0*23+1*22+1*21+0*20=32+0+0+4+2+0 = 38
• 1000100 = 1*26+0*25+0*24+0*23+1*22+0*21+0*20=64+0+0+0+4+0+0 = 68
Hexadecimal is the base 16 number system which consists of number 0-9 and alphabets from
A-F. It is used in IT to define places in memory. It characterise each byte as
2 hexadecimal digits only compared to 8 digits while using binary.
When values are changed from TRUE ,FALSE to 1,0 it doesnot make any change however
output will remain as TRUE or FALSE even if input are 0,1.