Machine-translated by Google. Questions are authored in English.
Top

Discussion

If a byte is used as a storage unit, number 5 and character 5 in assembly language are stored as :

  • A.00000101B and 00110101B
  • B.01110101C and 00110101B
  • C.00000011B and 00000101B
  • D.None of the above

Answer: A

They are stored as 00000101B and 00110101B.

The number 5 is stored in pure binary: \(5 = 101_2\), which in a byte is 00000101. The character '5' is stored as its ASCII code, 35H = 53 decimal, which is 00110101 in binary.

Option C's 00000011 is 3, not 5, and option B's 01110101C is not a valid binary byte. So only option A is right, and 'None of the above' is wrong.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.