In: Computer Science
11) var1 byte 148
or var1,26h
Show the hexadecimal digits in var1:
12) mov eax -1
WHAT IS THE HEX IN EAX
13) Multiply 10011b x 10110b in binary
(148)10=10010100 (convert to binary. ) First convert to hex, find the remainder, 148%16=4
divide by 16 148/16=9 find the remainder 9%16 = 9
divide by 16 9/16 =0 so stop. hex is reveser order of remainders.
148 = 94h =100101002 Write the 4 digit binary of each hexa digit 9->1001 4->0100
26h =00100110 Write the 4 digit binary of each hexa digit. 2->0010 6->0110
10010100 (OR) 0 or 0 =0, 0 or 1=1, 1 or 0 =1, 1 or 1=1
00100110
-------------------------
10110110 = 1011 0110 =B6h
var1=B6h
(12) mov eax,-1
eax=FFFFFFFF
-1 will be stored in 2's complent form
2's complment = 1's complement of 1 + 1
1=00000000000000000000000000000001 (32 bit)
1'scomplement= 11111111111111111111111111111110 (obtained by inverting 0 to 1 and 1 to 0)
2's compl=1'comp+1=11111111111111111111111111111110+1=11111111111111111111111111111111
=FFFFFFFF16
(3)
10011×101101001101001100100110000110100010
10011
×10110
----------------------------------------------
00000
100110
1001100
00000000
100110000
-----------------------------------------------------
110100010