Question

3) Assume a computer has 32-bit integers. Show how the value 0xCAFEBABE would be stored sequentially...

3) Assume a computer has 32-bit integers. Show how the value 0xCAFEBABE would be stored sequentially in memory, starting at address 0x100, on both a big-endian machine and a little-endian machine, assuming that each address holds one byte.

Address

Big Endian

Little Endian

0x100

0x101

0x102

0x103

Homework Answers

Answer #1

Answer :

Little Endian and Big Endian are two ways of storing multiple bytes of data on memory locations.

In Little Endian machine the lower byte(byte starting from LSB) will be stored at lower address which is 100 in the question

In Big Endian machine the lower byte(byte starting from LSB) will be stored at highest address which is 103 in the question.

In the above example the hexadecimal value 0xCAFEBABE in binary is as follows:

CA FE BA BE
11001010 11111110 10111010 10111110
MSB------------------------------------------------------LSB
Higher byte(CA) lower byte(BE)

So In Little Endian the data will be stored as :
100 101 102 103
(Lower address) (highest address)

10111110(BE) 10111010(BA) 11111110(FE) 11001010(CA)

So In Big Endian the data will be stored as :
100 101 102 103
(Lower address) (highest address)

11001010(CA) 11111110(FE) 10111010(BA) 10111110(BE)
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Consider decimal number 1027. This value is stored as a 16-bit two's complement number into addresses...
Consider decimal number 1027. This value is stored as a 16-bit two's complement number into addresses 124 and 125 on a little endian machine which has an addressable cell size of one byte. What values (in hexadecimal) are in each of these addresses: 124:   125:
1. In the following C code, elements of each row are stored contiguously in memory. Assume...
1. In the following C code, elements of each row are stored contiguously in memory. Assume each element in an array is a 32-bit integer. p = 0; for (j=0; j<8; ++j) for(i=500; i>0; --i ) {     A[ i] = 2 * B[j]; ++p; } a. How many 32-bit integers can be stored in a 32-byte cache block? b. Which variable references exhibit temporal locality? c. Which variable references exhibit spatial locality?
1. Suppose we have a 32KB direct-mapped data cache with 32-byte blocks. a) Show how a...
1. Suppose we have a 32KB direct-mapped data cache with 32-byte blocks. a) Show how a 32-bit memory address is divided into tag, index and offset. Show clearly how many bits are in each field. b) How many total bits are there in this cache? 2. Suppose we have a 8KB direct-mapped data cache with 64-byte blocks. a) Show how a 32-bit memory address is divided into tag, index and offset. Show clearly how many bits are in each field....
A digital computer has a memory unit with 32 bits per word. The instruction set consists...
A digital computer has a memory unit with 32 bits per word. The instruction set consists of 147 different operations. All instructions have an operation code part (opcode) and two address fields: one for a memory address and one for a register address. This particular system includes eight general-purpose, user-addressable registers. Registers may be loaded directly from memory, and memory may be updated directly from the registers. Direct memory-to-memory data movement operations are not supported. Each instruction stored in one...
Computer archieture 1. Let us assume we have such a machine. The physical RAM has 32...
Computer archieture 1. Let us assume we have such a machine. The physical RAM has 32 bytes, and is evenly divided into 4 pages. The virtual memory has 16 pages. The content in the page table and physical RAM is shown below Physical RAM Page Num Page data 3 11 ~QWERTYU 2 10 IOPASDFG 1 01 HJKLZXCV 0 00 BNM<>[]? Page table 15 0 14 0 13 0 12 1 01 11 0 10 0 9 1 11 8 0...
Microprocessor 8086 material. Choose the correct answer. 1- For a (64K x 8) RAM, the number...
Microprocessor 8086 material. Choose the correct answer. 1- For a (64K x 8) RAM, the number of address lines is: * 17 19 16 15 20 14 18 2-Which of the following instructions requires (BYTE PTR)? * SHR [500H], 3h LDS SI, [1000H] LAHF PUSH [9AAH] ADD AX, [800H] 3-Where are the interrupt vectors located in the microprocessor’s memory? * in the first 64K byte in the first 1K byte in the first 256K byte in the first 1M byte...
High-level computer languages are created to be understood by humans. As a result, the keywords and...
High-level computer languages are created to be understood by humans. As a result, the keywords and the commands of these languages are easy to understand. Machine languages are harder to understand and operate. For this assignment, you should assume that the memory cells at addresses F0 to F9 are in the machine described here: Op-Code Operand Description 1 RXY LOAD the register R with the bit pattern found in the memory cell whose address is XY 2 RXY LOAD the...
1. The memory units that follow are specified by the number of words times the number...
1. The memory units that follow are specified by the number of words times the number of bits per word. How many address lines and input/output data lines are needed in each case? (a) 8K X 16 (b) 2G X 8 (c) 16M X 32 (d) 256K X 64 2. Give the number of bytes stored in each memory unit in question 1. 3. Word number 563 decimal in the memory shown in Fig. 7.3 (see Mano-Ch7.pdf) contains the binary...
Can i get the answer to these questions in detail explaining how you go to the...
Can i get the answer to these questions in detail explaining how you go to the solution 1.Convert to/from Hex (0) 2.Octal Binary Unsigned/ 2’s complement 3.Understand how to shift and rotate. 4.Understand the relationship between shifting and multiplication/division 5.Be able to recognize and use the following gates: AND OR NOT NAND NOR XOR 6.Understand how a half adder works Given a logical statement ((A OR B) AND NOT(C OR A)) show the gates. 7.What is the difference between an...
I. What value will be in register r2 after execution of the following instructions? Show your...
I. What value will be in register r2 after execution of the following instructions? Show your work with the register values after executing each instruction. MOV r2, #0x0 LDR r1, =0xCF MOVS r1, r1, LSR #1 ADC r2, r2, #0 MOVS r1, r1, LSR #1 ADC r2, r2, #0 II. Assume a 32 bit register holds a data of four bytes as B3B2B1B0. Write a sequence of ARM instruction that takes this data as input and swaps the bytes 0...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT