There are infinite ways to represent a number. The four commonly
associated with modern computers and digital electronics are: decimal, binary,
octal, and hexadecimal.
Decimal (base 10) is the way most
human beings represent numbers. Decimal is sometimes abbreviated as dec.
Decimal counting goes:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, and so on.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, and so on.
Binary (base 2)
is the natural way most digital circuits represent and manipulate numbers.
Binary numbers are sometimes represented by preceding the value with '0b', as
in 0b1011. Binary is sometimes abbreviated as bin.
0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011,
1100, 1101, 1110, 1111, 10000, 10001, and so on.
Octal (base 8):-
Octal is sometimes abbreviated as oct.
Octal counting goes: 0 to 7 and its combination
0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, and so on.
0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, and so on.
Hexadecimal (base 16)
Hexadecimal counting goes: 0 to 9 and A to F and its
combination (E=10 and F=15)
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, and so on.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, and so on.
Converting Binary to Octal:-
Group Binary digit into group of three( should be 7) from
right.(add 0 to left side if group of 3 digit is not possible )
10011011= 010 011 011 = 02+21+00 02+21+20 02+21+20
= 233
10101 = 010 101 = 0+2+0
4+0+1 = 25
Binary to Hexadecimal:-
Group Binary digit into group of 4 from right to left
10101 = 0001 0101 = 0+0+0+1
0+4+0+1=15 (if first group itself was 15 then it will be F but 15 is the
combination of two groups)
Converting Octal to
Binary:-
345 = find the binary of
each digit and combine them.
Converting Hexadecimal to Binary:
Hexadecimal Number : 1516
1 in binary is 1
5 in binary in group of 4 is = 0101
Combine them = 10101
Converting Binary to Decimal:-
1010 = 23+02+11+00 =8+2
=10
Decimal, binary, octal and
hexadecimal of 0 and 1 are 0 and 1 itself.
while converting binary to octa or hexa, group them in 3
or 4 respectively combine each group(but add digits within group)

No comments:
Post a Comment