HW 6, due Mon, Aug 24
This is purely a written homework. Submit your answers to the following questions as a document or documents (plain text, pdf, rtf, or word) on Blackboard. If you prefer, you may put your answers on a web page or pages, and turn in on Blackboard the URL for the page(s). (Be sure to include the timestamp code, per the policies.)
Each binary problem specifies the representation (unsigned / signed magnitude / two's complement / floating point) including number of bits; be careful to follow the specified format. If the specification or calculation causes a problem within that specification, explain.
- [16 points]
Determine the decimal value of the following unsigned binary numbers:
(a) 0000011000; (b) 0000110001; (c) 0001111111; (d) 1000000000
and the following signed magnitude binary numbers (the sign is the leftmost bit):
(e) 1000110001; (f) 0110011000; (g) 1000000001; (h) 1000000000 - [12 points]
Using exactly 8 bits, what is the unsigned binary representation of each of the following values:
(a) 23; (b) 55; (c) 275
and the two's complement binary representation of each of the following:
(d) -5; (e) -97; (d) -123 - [8 points]
Show the binary representation of the following floating point numbers, using 16 bits, with 10 bits for a signed magnitude mantissa and 6 bits for a signed magnitude exponent:
(a) +7.5; (b) -20.25; (c) -1/64; (d) +32.1 - [8 points]
Write a short message (full credit for only a few letters, e.g., your initials) in binary, using the Unicode encoding of characters. Note that with Unicode, the message need not be in English. First write your message with "human" characters, then using the Unicode codes, then in binary. The Unicode codes are typically writen in hexadecimal; e.g., the Basic Latin chart tells us that "C" is hexadecimal 0043. To convert hexademical to binary, remember that a hexadecimal digit represents a number from 0 to 15 (with 10-15 written A-F), and thus it takes exactly four bits. The whole code for a character is then 16 bits; e.g., "C" = U+0043 = 0000 0000 0100 0011 (spaces just for clarity). - [8 points]
Sum the following pairs of 8-bit binary numbers, showing the carry bits:
(a) 01100110 and 10010110; (b) 01100011 and 11000110 - [8 points]
- Show the inputs and outputs for each of the gates in the EQUAL circuit from class, when given A=1, B=0.
- Show the values for each parenthesized expression (e.g., ~A * B * C) in the majority vote Boolean expression from class, when given A=1, B=0, C=1.
- [24 points]
Design circuits (using AND, OR, and NOT gates) to implement the following truth tables:-
A B out 0 0 0 0 1 1 1 0 1 1 1 0 -
A B out 0 0 1 0 1 1 1 0 0 1 1 1
-
- [16 points]
Write the truth table and design circuit to compute "odd parity". This computation has three inputs and one output. The output is a 1 if and only if an even number (0 or 2) of its inputs are a 1. Otherwise, the output is a 0.