What are number systems in Computers?
The technique to represent numbers in the computer system architecture. Every value that you are saving or getting into/from computer memory has a defined number system.
Binary Number System
Has only two digits that are 0 and 1. Every number represents with 0 and 1 in this system. It is a base 2 system because it has two digits.
Octal Number System
has only eight digits 0 to 7. Base 8 because it has 8 digits.
Decimal Number System
only ten digits 0 to 9. base 10 because it uses 10 digits.
Hexadecimal Number System
16 alphanumeric values from 0-9 and A-F. The base of this number system is 16 because it has 16 alphanumeric values. Here A is 10, B is 11, C is 12, D is 13, E is 14, and F is 15.
Decimal System to Other Base
Divide the decimal number by the base of the target base system.
add (write down) the remainder to the binary number and keep dividing by the target base until there is no remainder.
Other Base System to Decimal Base
Determine the base value of the number you want to convert to decimal, and also determine the position of digits. (first digits position is 0, second is 1, and so on.)
Multiply each digit with its corresponding base to the power of it’s position value
Add the resulted values together