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
- 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
- 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
- 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
- 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
- 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
- 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
- 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)
- 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
- 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
- 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
- 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
- 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
- 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
- What bit pattern is loaded into register AL with the following instruction?
mov al,516+*
- What bit pattern is loaded into register CL with the following instruction?
mov cl,-
- 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:
- 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:
- Without using mul or imul instructions, write some code that replaces the signed integer N in EAX with โ 7 ร N :
- Write at most three lines of code that multiply the REAL4 code in EAX by 0.25, without using any floating point coprocessor instructions:
- Express (631) 10 in radix 2, radix 8 and radix 16:
- Write (32) 10 in the shortest-possible unsigned integer binary code:
- Write (โ32) 10 in the shortest-possible signed integer binary code:
- Convert (17.75) 10 to radix 2:
- Convert (โ1.5) 10 to a REAL4 floating-point code (write the answer in hex):
- What values do the following bit patterns represent in 8-bit unsigned integer code?
Bit pattern: Value (in radix ten): 11111111 01111111 11111110
- 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: _ _ _ _ _. _ _