August 18, 2023
August 22, 2023
August 18, 2023
###### APPSC Polytechnic College Lectures-2020 General Paper
August 22, 2023
 Question 1
An array of two byte integers is stored in big endian machine in byte addresses as shown below. What will be its storage pattern in little endian machine?
0 X 104 78
0 X 103 56
0 X 102 34
0 X 101 12
 A 0 X 104 12 0 X 103 56 0 X 102 34 0 X 101 12 B 0 X 104 12 0 X 103 34 0 X 102 56 0 X 101 78 C 0 X 104 56 0 X 103 78 0 X 102 12 0 X 101 34 D 0 X 104 56 0 X 103 12 0 X 102 78 0 X 101 34
Question 1 Explanation:
In little endian the LSB parts of the data are stored first, whereas in big endian the MSB parts are stored first.
In the given question each integer is two bytes. 0x101, 0x102 are part of one word.
In the big endian 0x101 has 12 and 0x102 has 34. In the little endian 0x101 will have 34 and 0x102 will have 12.
Similarly in the big endian 0x103 has 56 and 0x104 has 78…in the little endian 0x103 will have 78 and 0x104 will have 56.
Question 1 Explanation:
In little endian the LSB parts of the data are stored first, whereas in big endian the MSB parts are stored first.
In the given question each integer is two bytes. 0x101, 0x102 are part of one word.
In the big endian 0x101 has 12 and 0x102 has 34. In the little endian 0x101 will have 34 and 0x102 will have 12.
Similarly in the big endian 0x103 has 56 and 0x104 has 78…in the little endian 0x103 will have 78 and 0x104 will have 56.