CS 10051-003/004 Introduction to Computer Science - Spring 2008

Homework 3 - Chapter 4

Due Monday, March 3, 2008 at the start of the class period
A paper copy of the assignment is due by the beginning of class. Submissions may be neatly handwritten or typed. Electronic submission only (no hard copy) is a reduction in the homework score equivalent to 1%. 

Hints: Circuit diagrams can be drawn by hand or printed out using the lab's circuit simulator.

Don't wait until the last minute to complete the assignment.  Give yourself time to read ALL of Chapter 4, digest the material, and work on the questions as read / review the chapter.  Do read the chapter!

# Question Description Answer Notes
1 #1 on Page 184

Given our discussion of positional numbering systems in Section 4.2.1, see whether you can determine the decimal value of the following numbers.
a.  133 (base 4)
b. 367 (base 8, also called octal)
c. 1BA (base 16, also called hexadecimal. B is the digit that represents 11; A is the digit that represents 10.)

   
2 #2 on Page 184 In Exercise 1(c), we used the letters A and B as digits of the base-16 number.  Explain why that is necessary.    
3 #1 on Page 142

What is the value of the 8-bit binary quantity 10101000 if it is interpreted
a. as an unsigned integer and
b. as a signed integer represented in sign/magnitude notation?

   
4 #6 on Page 184 Assume that we use 10 bits to represent signed integers, using sign/magnitude notation.  What are the largest (in absolute value) positive and negative numbers that can be represented on our system?  
5 #8 on Page 184 Assume that our computer stores decimal numbers using 16 bits--10 bits for a sign/magnitude mantissa and 6 bits for a sign/magnitude base-2 exponent.  (This is exactly the same representation used in the text).  Show the internal representation of the following decimal quantities.
a. +7.5    b. -20.25    c. -1/64
 
6 #5 on Page 142 Perform the following 5-bit binary addition showing the carry bit that propagates to each column.  Assume the numbers are unsigned binary quantities:
    
  01110
+ 01011
	
 
7 #10 on Page 184

How many binary digits would it take to represent the following phrase in ASCII code?  In UNICODE?  (Do not include the "" marks).

"Invitation to Computer Science"

 
8 #15 on Page 184 Assume that a=1, b=2, and c=2.  What is the value of each of the following Boolean expressions?
a. (a > 1) OR (b = c)
b. [(a + b) > c] AND (b <= c)
c. NOT(a = 1)
d. NOT[(a = b) OR (b = c)]
 
9 #19 on Page 185 Build a majority-rules circuit.  This is a circuit that has three inputs and one output.  The value of its output is 1 if and only if two or more of its inputs are 1; otherwise, the output of the circuit is 0.  For example, if the three inputs are 0, 1, 1 your circuit should output a 1.  If its three inputs are 0, 1, 0, it should output a 0.  This circuit is frequently used in fault-tolerant computing-- . . . (see text) You MUST show the Truth Table AND the circuit diagram
10 #24 on Page 185 Design a 3-to-8 decoder circuit.  Use the design of the 2-to-4 decoder circuit shown in Figure 4.29 as a guide. Show the circuit diagram

Last Updated: Tuesday, February 26, 2008