240 Problem Samples
240 Problem Samples
CS240 Homework 2
For full credit, justify (explain) your answers; show all the work
PROBLEM 1 (give a brief explanation)
a. What is the range of unsigned integer numbers that can be represented with
4 bits
8 bits
32 bits
n bits
b. What is the range of numbers in signed magnitude format that can be represented with
4 bits
8 bits
32 bits
n bits
c. What is the range of integers in signed 2s complement that can be represented with
4 bits
8 bits
32 bits
n bits
PROBLEM 2
A. Convert the following (unsigned) decimal numbers to the indicated bases:
Note: if the fraction has very many or infinitely many digits truncated to 3 digits after the point
26.50
37.150
61.125
17.60
255
to binary
to octal
to hexa
to binary
to binary, octal, and hexadecimal
PROBLEM 3
Perform the arithmetic operations (-7) + (12), (+80) + (90) and (-21) + (-15), in binary using the signed 2s
complement representation. Use 8 bits registers.
CS240
Lecturer: Simina Fluture, PhD.
PROBLEM 4
Use Booths multiplication algorithm for computing:
(-4) x (3)
(-6) x 9
PROBLEM 5
Convert +13.125 in a IEEE 754 single precision format.
Convert -36.250 in a IEEE 754 double precision format.
PROBLEM 6
What is the decimal floating number represented by the 32-bit word
1100 1010 0110 1000 0000 0000 0000 0000
PROBLEM 7
Give the decimal number represented by the 32-bit word 1001 0110 0101 0000 0000 0000 0000 0000 if
a. An unsigned representation has been used
b. A sign magnitude representation has been used
c. A signed 2s complement representation has been used
d. A 754 IEEE representation has been used
Problem 8:
Find the complement of: F = y + xz; Show that F + F =1
Problem 9:
Given the following Boolean function:
Express it as sum of minterms
F = AC + AB + ABC + BC
Problem 10:
Show that the dual of the exclusive-OR is equal to its complement.
Problem 11:
Simplify the Boolean expressions using three-variables and four-variables maps:
a.
F(x,y,z) = (0,2,3,4,6)
b.
F(A,B,C,D) = ABC + BCD + BCD + ACD + ABC + ABCD
c.
F(x,y,z,w) = (2,3,9,11,12,13,14,15)
Problem 7:
Design a combinational circuit with 3 inputs xyz and three outputs ABC. When the binary input value
is 0,1,2,3 the binary output value is one greater than the input. When the binary input is 4,5,6,7 the
binary output is one less than the input.
Problem 12:
Implement F(A,B,C) using a multiplexer.
F(A,B,C) = (0,1,5,7)