Why HEX?

Status
Not open for further replies.

Electroenthusiast

Active Member
These might be a simple questions, i'm asking bcos it was in mind for many days...

Why is Hexadecimal number system used in microcontrollers?
8bit > 4bit 4bit > so XX is Hexadecimal?
Why is there no 4 bit Microcontoller ?
Is it always "Program(Instructions) is stored in ROM and Data always stored in RAM"?

On what basis Mictocontrollers are named?
Ex: 8051 family, why no 7051?any other number?
 
Last edited:

Think of hexadecimal as a short handed form for binary. Each hex symbol you write out represents a sequence of 4 binary digits. It's just less work to write and more compact. Octal is used too. Octal and hex are used because it is very easy to convert binary into octal and hex- you just split the binary sequences up into groups of 4 digits and each group's numeric value in binary is the same as that in hex or octal.

4-bit was probably just too few states to do anything useful and the technology was cheap enough to jump straight to 8-bit.

IN harvard architecture, data and instructions are stored like that. BUt not in von Neumon architecture. In that one they are all stored in the same block of memory.

Microcontrollers are named however the maker wants them named.
 
Last edited:
The original microprocessor 4004 was 4 bit.

8 bit microprocessors are simply two 4-bits joined together.

Microprocessors could not access the outside world.


Then the idea of making a chip that did not need extra "glue" chips. They named it a MICROCONTROLLER to distinguish it from processors that needed lots of other surrounding chips.

If you have 8 cells that can be 00000000 to 11111111 the total for 11111111 = 256. You can use 00 to 256 but the number 256 requires three cells to hold the number 256.
If you use HEX, you only need to use 2 cells to hold up to 256. 256 = FF


Program (Instructions) are stored in ROM - this is READ ONLY and the values cannot be changed.

Data is stored in RAM - this is RANDOM ACCESS MEMORY and the values in the cells can be changed. Quite often you want to store data for a short period of time during the running of a program and then use the cell again to store a different value.

See Wiki - Wikipedia, the free encyclopedia for all this type of information - I am only going from memory.
 

What exactly are 'Cells' Here?
 
Hexadecimal is just a convenient type of binary, for systems based on multiples of four bits (pretty well any modern system). It's a LOT easier to understand, and remember, A2CE than the binary stream of 16 ones and zeros.

Prior to hex, base eight (octal) was commonly used, because systems of the time had memory divisable by three - so you only used the characters 0 to 7.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…