0% found this document useful (0 votes)
7 views2 pages

Mid Term

The document contains a series of questions related to Boolean functions, data definitions, number system conversions, MIPS assembly instructions, sequential circuits, and counter designs. Each question requires specific calculations or simplifications, such as simplifying Boolean functions, determining memory addresses, and analyzing circuit behavior. The questions are structured to assess knowledge in digital logic design and computer architecture.

Uploaded by

cmy202388
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Mid Term

The document contains a series of questions related to Boolean functions, data definitions, number system conversions, MIPS assembly instructions, sequential circuits, and counter designs. Each question requires specific calculations or simplifications, such as simplifying Boolean functions, determining memory addresses, and analyzing circuit behavior. The questions are structured to assess knowledge in digital logic design and computer architecture.

Uploaded by

cmy202388
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

(4 marks) Simplify the Boolean function of four variables: f (w,x,y,z) =


∑(1,3,4,6,9,11,12,14). Note:1 stands for 0001 = wxyz. The simplification result
is:_______
2. (4 marks) Given the following data definitions: .data X: .word -8, 2, 4,10 Y: .half
3, 2 #.half means half-word Z: .byte ’A’, ’B’, ’C’ Suppose the address for X is
0x10010000, the hexadecimal addresses for Z will be:_____
3. (4 marks) Consider the conversion between two number systems. Suppose
(123)5 = (x3)y , where x and y are positive integers less than 10. Then the value of
x is _.
4. (5 marks) Suppose we want to load the address 0000 0000 0001 0000 1000 0000
0000 0000 into register $s0 using the following two instructions. lui $s0, 16
addi $s0, $zero, 32768 # 32768 is a decimal value (a) (3 marks) Can the two
instructions successfully load the correct address? Explain your reason. (b) (2
marks) If your answer is NO, modify one instruction such that we can load the
address correctly.
5. (6 marks) Consider the following circuit consisting of two D-Flip-Flops. The state
is denoted as Q0Q1. Suppose at time t, the state is 00. Then, the states at time (t
+ 1), (t + 2), (t + 3) should be __.
6. (4 marks) Using Boolean algebra to simplify this function f = x′y′ + xy + x′y such
that the result is a sum of two terms and each term contains a single variable or
its complement. Show your solution steps.

7. (6 marks) Consider the following multiplexer where the four data lines (10, 11,
12, 13) are selected by two select lines (A1A0). Note: 10, 11, 12, 13, A1, and A0
are the names of pins in the circuit. Specifically, the combinations A1A0 =
00,01,10,11 will select the data line 10, 11, 12, 13, respectively. x,y,z are the
inputs of this circuit and f is the output. EN is the Enable input such that when
EN = 0, f= 0 regardless of the inputs. (a) (1 marks) What’s the value of f when z =
1 ? (b) (2 marks) What’s the value of f when x = 1, y = 1, z = 0 ? (c) (3 marks)
f(x,y,z) =_____
8. (4 marks) Assume x and y are negative integers stored in 2’s complement form in
registers $s1 and $s2, respectively. Complete the following MIPS assembly
instructions that will store x +y in a register $s3 and if there is an overflow,
branch to a symbolic address overflow. add _, $s1, $s2 slt $t0, _, _ bne $t0, _,
overflow
9. Analyze the sequential circuit consisting of two D Flip-Flops shown in the
following figure. Use A and B to denote the current state.Use AN and BN to
denote the next state. Complete the following steps: • (6 marks) Observe the
circuit, derive DA, DB and Z as the functions of current state and external input.
• (4 marks) Derive the next state AN , BN as the functions of current state and
external input. • (5 marks) We use the following encoding of the states: AB = 00,
01, 10, 11 represents state S0, S1, S2, S3 respectively. Derive the state table
shown below.
10. Use a sequential circuit to implement an up-down counter. This counter will
count through 0, 1, 2, 3 and an external input X will control the counting
direction. Specifically, when X = 0, the counter will count up: 0,1,2,3,0,1,2,3, etc;
when X = 1, the counter will count down: 0,3,2,1,0,3,2,1, etc. Complete the
following design steps: (a) (5 marks) Draw a state diagram of this counter. Using
’0’, ’1’, ’2’, ’3’ to denote the state. (b) (4 marks) We use two bits Q1Q0 to encode
the states as follows: Q1Q0 = 00, 01, 10, 11 represent 0, 1, 2, 3, respectively.
Derive the state table. (c) (5 marks) Suppose we use two J-K flip-flops (JKFF0 and
JKFF1) to implement this counter. Q0 and Q1 are the outputs of JKFF0 and JKFF1,
respectively. (J0, K0) and (J1, K1) are the inputs of JKFF0 and JKFF1, respectively.
Derive the excitation table for the circuit. (d) (6 marks) Derive J0, K0, J1, and K1
as functions of Q1,Q0,X, respectively.

You might also like