HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Why do Computers use Hex Number System at assembly language?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
whynumbersystemlanguagecomputershexassemblyuse

Problem

Why do computer use Hex Number System at assembly language? Why don't they use any other number system like binary, octal, decimal? What thing forced computer designer to use hex system at assembly? Why it looked so beneficial to them?

Solution

Computers don't use the hexadecimal number system for assembly language. Assembly language, or rather machine code, uses base 256 (typically): instructions are encoded in units of bytes. When displaying machine code, it is customary to use octal or hexadecimal. The reason is that in many cases, the byte is further subdivided into bitstrings, and identifying these bitstrings is easier when using a base which is a power of 2. Hexdecimal is particularly compact since each byte can be encoded using exactly two hexadecimal digits.

Context

StackExchange Computer Science Q#27657, answer score: 6

Revisions (0)

No revisions yet.