...
NIC-NIELIT Scientist-B 2020
August 18, 2023
APPSC Polytechnic College Lectures-2020 General Paper
August 22, 2023
NIC-NIELIT Scientist-B 2020
August 18, 2023
APPSC Polytechnic College Lectures-2020 General Paper
August 22, 2023

ISRO CS 2020

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?
Address Data
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.
Correct Answer: C
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.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!