Question

In: Computer Science

The unsigned decimal value (1,036)10 is to be stored as a 16-bit word in memory. Show...

  1. The unsigned decimal value (1,036)10 is to be stored as a 16-bit word in memory.
    1. Show the 16-bit unsigned binary representation of (1,036)10.
    2. Show the 4-digit unsigned hexadecimal representation of (1,036)10.
    3. The unsigned binary value of part (a) should be stored using two bytes of a byte-addressable memory at locations 400 and 401. Specify the hexadecimal value in each byte for a “big endian” instruction set architecture. Give your answer by showing a table like the one below.

                                                                                               Big Endian

Location Contents (Byte) 400:

401:

Solutions

Expert Solution

a)
Divide 1036 successively by 2 until the quotient is 0
   > 1036/2 = 518, remainder is 0
   > 518/2 = 259, remainder is 0
   > 259/2 = 129, remainder is 1
   > 129/2 = 64, remainder is 1
   > 64/2 = 32, remainder is 0
   > 32/2 = 16, remainder is 0
   > 16/2 = 8, remainder is 0
   > 8/2 = 4, remainder is 0
   > 4/2 = 2, remainder is 0
   > 2/2 = 1, remainder is 0
   > 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 10000001100
So, 1036 of decimal is 10000001100 in binary
so, 1036 in 16-bit binary is 0000010000001100
Answer: 0000010000001100

b)
Hexadecimal     Binary
    0           0000
    1           0001
    2           0010
    3           0011
    4           0100
    5           0101
    6           0110
    7           0111
    8           1000
    9           1001
    A           1010
    B           1011
    C           1100
    D           1101
    E           1110
    F           1111
Use this table to convert from binary to hexadecimal
Converting 0000010000001100 to hexadecimal
0000 => 0
0100 => 4
0000 => 0
1100 => C
So, in hexadecimal 0000010000001100 is 0x040C
Answer: 0x040C

c)
using big-endian
0x04 is stored at memory location 400
0x0C is stored at memory location 401
Answer:
---------
400:    0x04
401:    0x0C



Related Solutions

9- Show how the word ABCD H is stored in the memory starting at 0A002 H?...
9- Show how the word ABCD H is stored in the memory starting at 0A002 H? 11- How the decimal number 500 is stored in the memory? 13- Which two values are needed for memory address calculations? 15- What are the steps of an instruction execution? Briefly explain each step. please answer all of them I will upvote! 19- Calculate the value of memory address in each case: a) 2000:33BB b) 0200:AA00 c) 0220:00BC 20- A data segment is to...
Design a 64M x 64-bit memory using 16M x 16-bit memory modules.
Design a 64M x 64-bit memory using 16M x 16-bit memory modules.
The followings are 8-bit words is stored in the memory. Suppose when the words were read...
The followings are 8-bit words is stored in the memory. Suppose when the words were read from the memory, the check bits are calculated to be 0010. Using Hamming error correction code, find the he check bits stored together with the word, the syndrome word and the word fetched from the memory for the word given below. 0110 1010                                                                                                                      1111 0001                                                                                                                     
HCS12 Assembly Language: 1. Write a program to convert a decimal number stored at memory location...
HCS12 Assembly Language: 1. Write a program to convert a decimal number stored at memory location $1010 into a binary number. Store the result in memory location $2000
Explain the following: a bit, octet, hexadecimal, and decimal value
Explain the following: a bit, octet, hexadecimal, and decimal value
Assume that the variables w, x, y, and z are stored in memory locations 16, 32,...
Assume that the variables w, x, y, and z are stored in memory locations 16, 32, 48, and 128 respectively. Translate the following algorithmic operations into MIPS language equivalents: [Assume $s1 is the base register, and $s1 contains the address of memory location 0]                                                                                                             if ((x – y) ³ w) then       set x to y else: set x to z endif
Show the decimal integer -143 in 10-bit sign magnitude, one's complement, two's complement and excess-511 respectively...
Show the decimal integer -143 in 10-bit sign magnitude, one's complement, two's complement and excess-511 respectively in the given order
Two integer numbers a=10 and b=20 are stored in the data segment of the memory. The...
Two integer numbers a=10 and b=20 are stored in the data segment of the memory. The number a is stored in Mem[0x10010000] and b is stored in Mem[0x10010004]. Write MIPS assembly code to swap the two numbers, load a to a register, b to another register and store a at Mem[0x10010004], store b at Mem[0x10010000].
10. Convert 101 1010 (seven bits) into a signed decimal (show work) 15. Give the value...
10. Convert 101 1010 (seven bits) into a signed decimal (show work) 15. Give the value of 011 1101 and C=0 with ROL (seven bits, show work) 16. Give the signed decimal value of 93A (12 bits, show work) 18. Give the binary equivalent of the decimal number of 13.57 (assume fixed point, no more than 6 bits left and right of the decimal point)
Convert the following decimal numbers to 16-bit 2’s complement binary. Display your result in hexadecimal. a.3030...
Convert the following decimal numbers to 16-bit 2’s complement binary. Display your result in hexadecimal. a.3030 b.404 c.5050 d.-5050 e.-20000 Show work with steps
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT