Number System - Decimal, Binary and Hexadecimals Numbers

What is Number System?

  • System of writing and representing numbers in different forms
  • Covers the way of writing numbers and associated operations

Decimal Numbers

  • Has 10 digits - 0 to 9, that means, Radix = 10

Example,
2024 = 2 * 1000 + 0 * 100 + 2 * 10 + 4 * 1

  • Individual number is digit
2 0 2 4
d3 d2 d1 d0
  • Use in real life taking the fact into consideration that we have 10 fingers and it is convenient to count with them as decimal uses 10 digits from 0 to 9
  • Counting starts like 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, then 10, 11 , 12 … . It becomes two digits, then three like 101, 102, … and so on.

Binary Numbers

  • Efficient number system used by computers.
  • Radix = 2, i.e., we use two digits - 0 and 1
  • 0 and 1 are the representation of the lower and higher voltages at the hardware level, mainly with CPU

Example, Take number 1101
We can write it as (1101)base 2 - the subscript is used to determine which base the number belongs to, in this case base 2 is written, that means 0 and 1 are the only digits being used to write these number.

1 1 0 1
d3 d2 d1 d0
  • d0 is the least significant digit, any digit at position zero is least significant digit.

Hexadecimal Numbers

  • Mostly used for easy and short representation of binary numbers
  • Radix = 16, Hexadecimal Numbers uses 16 digits - 0 to 9 and A to F
  • A to F are equivalent to 10 to 15 in decimal

A base 16 = 10 base 10
B base 16 = 11 base 10
C base 16 = 12 base 10
D base 16 = 13 base 10
E base 16 = 14 base 10
F base 16 = 15 base 10

Example, 6D1A

6 D 1 A
d3 d2 d1 d0

We can make any base number, there is Octal number also, it has 8 digits. There can be as many as you wish to make, we can make 19 digits, 25 digits

These 4 - Decimal, Binary, Hexadecimal and Octal are standard.


© progshala.in