/15 CS2100 (AY2015/6 Semester 1) Assignment #1

advertisement
CS2100 (AY2015/6 Semester 1)
Assignment #1
/15
Name:
Tutorial Group No.:
You are to do this assignment on your own.
(Students found copying will be penalised.) Please
fill in your name and tutorial group number in the
box above, and your answers in the space indicated
below. You are not required to show workings.
Grader’s comments:
Please submit this assignment on 7th September
2015, Monday, during the CS2100 lecture. Answers
will be released on that day so late submission will
not be accepted.
Note: Use the dot () for the AND operation, i.e. for A AND B, write AB instead of just AB.
1. Have you filled in your tutorial group number above? It is worth 1 mark!
2.
Fill in the empty boxes to make this binary sequence a Gray code sequence.
1010
3.
[1 mark]
0101
You are told that a certain 4-bit decimal code is self-complementing. You are also told
that the decimal number 8503 is represented in this decimal code as: 1110 0010 1010
1000.
How many possible codes are there to represent the decimal number 612 in this code?
Write the answer in English (Eg: “One”, “Two”, “Three”) to avoid ambiguity. [2 marks]
Answer:
4.
A Boolean function F is given below:
F(A,B,C) = A + BC
Suppose Z(A,B,C) = F(A,B,C)  G(A,B,C) = m(1, 4, 5), what is G in m notation?
G(A,B,C) = m(
CS2100 (AY20015/6 Semester 1)
)
- 1 of 2 -
[2 marks]
Assignment #1
5. A circuit counts the number of ‘1’ bits in an unsigned binary integer ABCD and outputs an
unsigned binary integer PQR. For example, if ABCD = 0101, then PQR = 010; if ABCD =
1011, then PQR = 011. You are also told that the value of the input ABCD is in the range
from zero through eleven only (i.e, 12, 13, 14 and 15 are invalid inputs.)
[Recall in class, how do we write the output if the corresponding input is invalid?]
(a) What is the simplified SOP expression of P?
[1 mark]
P=
(b) What is the simplified SOP expression of Q?
[2 marks]
Q=
(c) What is the simplified SOP expression of R?
[2 marks]
R=
6. We may implement the circuit in question 5 above by using a full adder and a 2-bit
parallel adder as shown below, without using any additional logic gates. Do not modify
the inputs and outputs that are already drawn. Complete the diagram.
[2 marks]
2-bit
ADDER
FA
A
B
C
X
Y
Cin
Cout
S
1
0
X
Cout
P
1
0
Y
S 0
1
Q
R
Cin
7. A question will be given out on the spot during the lecture on 7th September. You are to
write the answer below.
[2 marks]
Answer:
CS2100 (AY20015/6 Semester 1)
- 2 of 2 -
Assignment #1
Download