IA-32 Assembly Language and Computer Organization Questions, Exams of Computer Architecture and Organization

A set of questions related to ia-32 assembly language and computer organization, covering topics such as binary and hexadecimal conversions, arithmetic operations, floating point representation, and bitwise operations.

Typology: Exams

2011/2012

Uploaded on 05/18/2012

koofers-user-gi7
koofers-user-gi7 ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ยฉ2006 University of Illinois at Chicago ECE 267 V. Goncharoff
ECE 267 โˆ’ Computer Organization and Programming
1. What is (31.625)10 converted into radix 2?
a) (11011.111)2
b) (11011.101)2
c) (11111.111)2
d) (11111.101)2
e) none of the above
2. What is (F.F)16 converted into radix 10?
a) (15.15)10
b) (15.9375)10
c) (15.375)10
d) (15.75)10
e) none of the above
3. What is (โˆ’128)10 written in 8-bit binary signed integer code?
Give the answer in hex notation.
a) 80h
b) 180h
c) F80h
d) FFh
e) none of the above
4. What is (76)10 written in binary signed integer code?
Give the answer in hex notation.
a) FB4h
b) B4h
c) 4Ch
d) 4C0h
e) none of the above
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download IA-32 Assembly Language and Computer Organization Questions and more Exams Computer Architecture and Organization in PDF only on Docsity!

ECE 267 โˆ’ Computer Organization and Programming

  1. What is (31.625) 10 converted into radix 2?

a) (11011.111) 2 b) (11011.101) 2 c) (11111.111) 2 d) (11111.101) 2 e) none of the above

  1. What is (F.F) 16 converted into radix 10?

a) (15.15) 10 b) (15.9375) 10 c) (15.375) 10 d) (15.75) 10 e) none of the above

  1. What is (โˆ’128) 10 written in 8-bit binary signed integer code? Give the answer in hex notation.

a) 80h b) 180h c) F80h d) FFh e) none of the above

  1. What is ( 76 ) 10 written in binary signed integer code? Give the answer in hex notation.

a) FB4h b) B4h c) 4Ch d) 4C0h e) none of the above

  1. N is stored in a 16-bit register using binary unsigned integer code. What are the minimum and maximum values of N that would permit us to store 256ร—N in the same register without overflow?

a) N (^) min = 0 , N (^) max = +256 b) N (^) min = 0 , N (^) max = + c) N (^) min = โˆ’128, N (^) max = +127 d) N (^) min = โˆ’64, Nmax = + e) none of the above

  1. What is (10000.0) 10 in 32-bit single-precision IEEE floating point code? Give the answer in hex notation.

a) 461C4000h b) 41800000h c) C61C4000h d) C1800000h e) none of the above

  1. Assume AX originally contains a signed integer N. What arithmetic operation does the following IA-32 assembly language instruction perform?

or ax,01h

a) N โ† N โˆ’ 1 b) N โ† N + 1 c) If N is odd, AX โ† N + 1 (otherwise no change in AX) d) If N is even, AX โ† N + 1 (otherwise no change in AX)

  1. EAX contains a 32-bit floating-point number X. What do the following IA- assembly language instructions accomplish?

ror eax, inc al ; <-- assume no overflow here rol eax,

a) X โ† X + 2. b) X โ† X + 1. c) X โ† X ร— 2. d) X โ† โˆ’ X e) none of the above

  1. What are the contents of register AX after the following instructions execute? Give the answer in hex notation.

mov ax, 12D8h and ax, ax

a) 12D8h b) FFFFh c) 0000h d) ED27h e) none of the above

  1. What are the contents of register BX after the following instructions execute? Give the answer in hex notation.

mov bx, 1234h ror bx, 3

a) 4321h b) 8246h c) 2341h d) 2468h e) none of the above

  1. What are the contents of register BX after the following instructions execute? Give the answer in hex notation.

mov bx, 90FFh sar bx, 8

a) FF00h b) 9990h c) 0090h d) FF90h e) none of the above

  1. Assume that register EAX stores X , a single-precision floating point number in IEEE format. The following instructions are then executed:

xor eax, 80000000h

What result is now in EAX (in IEEE format)?

a) โˆ’ X b) X c) X d) โˆ’ X e) none of the above

  1. Assuming that no overflow occurs, what arithmetic operation is performed by these five instructions?

; assume ax stores some integer

mov cx,ax add cx,ax add ax,cx shl cx, add ax,cx

; now what does ax store in terms ; of its original value?

a) AX โ† AX ร— 3 b) AX โ† AX ร— 19 c) AX โ† AX ร— 16 d) AX โ† AX ร— 9 e) none of the above

  1. What bit pattern is loaded into register AL with the following instruction?

mov al,516+*

  1. What bit pattern is loaded into register CL with the following instruction?

mov cl,-

  1. Write IA-32 instructions (including imul) that multiply the 32-bit signed integer in EAX by the 8-bit unsigned integer in BH, and store the result in EAX:
  2. Assume that register EAX stores a value in REAL4 binary code. Write one or more instructions that replace this value with its absolute value, also in REAL4 code:
  3. Without using mul or imul instructions, write some code that replaces the signed integer N in EAX with โˆ’ 7 ร— N :
  4. Write at most three lines of code that multiply the REAL4 code in EAX by 0.25, without using any floating point coprocessor instructions:
  5. Express (631) 10 in radix 2, radix 8 and radix 16:
  6. Write (32) 10 in the shortest-possible unsigned integer binary code:
  7. Write (โˆ’32) 10 in the shortest-possible signed integer binary code:
  1. Convert (17.75) 10 to radix 2:
  2. Convert (โˆ’1.5) 10 to a REAL4 floating-point code (write the answer in hex):
  3. What values do the following bit patterns represent in 8-bit unsigned integer code?

Bit pattern: Value (in radix ten): 11111111 01111111 11111110

  1. What values do the following bit patterns represent in 8-bit signed integer code?

Bit pattern: Value (in radix ten): 11111111 10000001 01000000

Answer: _ _ _ _ _ _ _ _ h

Answer: _ _ _ _ _. _ _