On two occasions I have been asked [by members of Parliament]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. Charles Babbage

Verify bit endian or little endian

Language Java | Level Intermediate | Category Algorithms | August 3, 2015 10:57 pm


Algorithm Problem Description

Little endian and big endian are ways to store multi-byte data types. Little endian store the last byte of binary representation of the multibyte store first. The big endian store first byte of binary representation of the multibyte store first.

Write a program to find whether machine is big endian or little endian.

Output

          	        
          	        

Little-endian

          	        
          	        				    


Comments



Please login to add comments.