CSci250 Assembly Language Programming: Homework 1 Solutions
Due date: Monday, September 22, 2008 in class
Absolutely no copying others' work
- What are the advantages of using microinstructions to implement machine instructions?
(10%)
Ans>
Flexibility. Microinstructions facilitate the machine-instruction implementation by microprogramming.
That is the microcode could be easily be changed, but the hard wired CPU designs are not.
- What is the minimum number of binary bits needed to represent the unsigned decimal integer:
1029
? 11
(10%)
- What is the octal representation of the hexadecimal integer:
3D7B
?
(10%)
(3D7B)16 = (36573)8
- What is the unsigned hexadecimal representation of the decimal integer:
4095
?
(10%)
(4095)10 = (FFF)16
- What is the 16-bit hexadecimal representation of the signed decimal integer:
-401
?
(10%)
(-401)10 = (FE6F)16
- The 16-bit hexadecimal number:
A3C4
represents a signed integer. Convert to decimal.
(10%)
(A3C4)16 = (-23612)10
- What is the decimal representation of the signed binary number:
11001101
?
(10%)
(11001101)2 = (-51)10
- What is the 8-bit binary (two's complement) representation of the signed decimal integer:
-101
?
(10%)
(-101)10 = (10011011)2
- What is the smallest value you can represent using a 256-bit signed integer? -2255
(10%)
- Create a truth table to show all possible inputs and outputs for the boolean function described by
A ∨ (¬B ∧ ¬C)
.
(10%)
Ans>
A |
B |
C |
A ∨ (¬B ∧ ¬C) |
F |
F |
F |
T |
F |
F |
T |
F |
F |
T |
F |
F |
F |
T |
T |
F |
T |
F |
F |
T |
T |
F |
T |
T |
T |
T |
F |
T |
T |
T |
T |
T |