In: Computer Science
Calculate the following
1) a. Give examples of each: A hex dword, a binary word, and
decimal byte
c. If x is a word, which command(s) are legal ?
movzx eax,x movzx ah,x movzx ax, x
d. How many bits in a word?
e. Put 12345h in DWORD format.
a)
Hex Dword is a number of bit size doubleword(64 bit) in form of a hexadecimal number.
an example of this would be A7B2 5C43 A345 D2D9
This is a hexadecimnal number which has 64 bits in it making it the size of a dword.
Binary word is a number of bit size Words(32 bit) in binary form.
an example of this would be 1000 1101 0101 0101 0110 1110 0111 1000
This is a binary number of bit size 32 which is the size of a word.
Decimal Byte is a number of bit size Byte(8 bit) in Decimal form.
An example of this is 245
This is a decimal number of size of a byte which is 8 bit.
d)
There are 32 bits in a word.
e)
12345h is a hexadecimal number.
in a dword format we have 64 bit. Each digit of hexadecimal number represent 4 bits in order to represent it in dword format we have to add required number of zeros in order to fill in the space of Dword.
Therefore there will be 16 digit in a DWord in hexadecimal format.
Thus 12345h in DWord format will be written as 0000 0000 0001 2345h.