Docsity

Homework 2 Solved | Computer Organization and Assembly Language Programming | CS 350, Assignments of Programming Languages

Toggle sidebar
bg1
Homework # 2 Solution
2.34!(a) 0111 (b) 0111 (c) 1101 (d) 0110
2.36!(a) AND with 11111011 (b) OR with 01000100 (c) AND with 00000000 (d) OR with
11111111 (e) AND the BUSYNESS pattern with 00000100 to isolate b2. Then add that
result to itself 5 times.
2.42"The ASCII values are being added, rather than the integer values. (ASCII โ€5โ€ is 53 in
decimal, and ASCII โ€8โ€ is 56 in decimal, adding to 109, which is ASCII โ€mโ€.)
2.52!See the table:
Value
Unsigned Binary
1โ€™s Complement
2โ€™s Complement
IEEE 754 floating point
ASCII String
x434F4D50
x55544552
1,129,270,608
1,431,586,130
1,129,270,608
1,431,586,130
1,129,270,608
1,431,586,130
207.302001953125
14,587,137,097,728
"COMP"
"UTER"
2.54!See the table:
X
Y
Z
Q1
Q2
0
0
0
0
1
0
0
1
0
1
0
1
0
0
1
0
1
1
0
1
1
0
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
0
2.55"(a) 63 (b) 4n โ€“ 1 (c) 310 (d) 222 (e) 11011.11 (f) 0100 0001 1101 1110 0000 0000
0000 0000 (g) 44m
3.6"C = Aโ€™; D = Bโ€™; Z = (C+D)โ€™ = (Aโ€™+Bโ€™)โ€™ = A . B"(jts xxx)
A
B
C
D
Z
0
0
1
1
0
0
1
1
0
0
1
0
0
1
0
1
1
0
0
1
3.7"There's a short circuit (a path from power to ground) if A # B.
CS 350: Comp Org & Assm Lang Pgmg!Spring'09!HW 2
J. Sasaki, CS Dept"Page 1 of 3"Illinois Institute of Technology
pf3

Partial preview of the text

Download Homework 2 Solved | Computer Organization and Assembly Language Programming | CS 350 and more Assignments Programming Languages in PDF only on Docsity!

Homework # 2 Solution

2.34! (a) 0111 (b) 0111 (c) 1101 (d) 0110

2.36! (a) AND with 11111011 (b) OR with 01000100 (c) AND with 00000000 (d) OR with

11111111 (e) AND the BUSYNESS pattern with 00000100 to isolate b2. Then add that

result to itself 5 times.

2.42" The ASCII values are being added, rather than the integer values. (ASCII โ€5โ€ is 53 in

decimal, and ASCII โ€8โ€ is 56 in decimal, adding to 109, which is ASCII โ€mโ€.)

2.52! See the table:

Value Unsigned Binary 1โ€™s Complement 2โ€™s Complement IEEE 754 floating point ASCII String x434F4D50 x 1,129,270,608 1,431,586, 1,129,270,608 1,431,586, 1,129,270,608 1,431,586, 207.302001953125 14,587,137,097, "COMP" "UTER"

2.54! See the table:

X Y Z Q1 Q

2.55" (a) 63 (b) 4 n^ โ€“ 1 (c) 310 (d) 222 (e) 11011.11 (f) 0100 0001 1101 1110 0000 0000

0000 0000 (g) 4^4 m

3.6" C = Aโ€™; D = Bโ€™; Z = (C+D)โ€™ = (Aโ€™+Bโ€™)โ€™ = A. B " (jts xxx)

A B C D Z

3.7" There's a short circuit (a path from power to ground) if A # B.

3.14" A multiplexer has one output line. A 16-input multiplexer has log!(16) = 4 input lines.