AWKUM-ICT-Week 06, 07
AWKUM-ICT-Week 06, 07
By
Miss. Kiran Falak
Lecturer of Computer Science
NUMBER SYSTEM
• Number systems are 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.
• Computer architecture supports following number systems.
• Binary number system
• Octal number system
• Decimal number system
• Hexadecimal (hex) number system
NUMBER SYSTEM
• BINARY NUMBER SYSTEM
• A Binary number system has only two digits that are 0 and 1. Every
number (value) represents with 0 and 1 in this number system. The
base of binary number system is 2, because it has only two digits.
• OCTAL NUMBER SYSTEM
• Octal number system has only eight (8) digits from 0 to 7. Every
number (value) represents with 0,1,2,3,4,5,6 and 7 in this number
system. The base of octal number system is 8, because it has only 8
digits.
NUMBER SYSTEM
• DECIMAL NUMBER SYSTEM
• Decimal number system has only ten (10) digits from 0 to 9. Every
number (value) represents with 0,1,2,3,4,5,6, 7,8 and 9 in this
number system. The base of decimal number system is 10, because it
has only 10 digits.
• HEXADECIMAL NUMBER SYSTEM
• A Hexadecimal number system has sixteen (16) alphanumeric values
from 0 to 9 and A to F. Every number (value) represents with
0,1,2,3,4,5,6, 7,8,9,A,B,C,D,E and F in this number system. The base of
hexadecimal number system is 16, because it has 16 alphanumeric
values.
NUMBER SYSTEM
CONVERSIONS:
• DECIMAL TO OTHER
• To convert Number system from Decimal Number System to Any
Other Base is quite easy; you have to follow just two steps:
A) Divide the Number (Decimal Number) by the base of target base
system (in which you want to convert the number: Binary (2), octal
(8) and Hexadecimal (16)).
B) Write the remainder from step 1 as a Least Signification Bit (LSB) to
Step last as a Most Significant Bit (MSB).
• DECIMAL TO Binary, Octal and Hexadecimal Number.
Examples:
• Convert (64)10 to ( )2, ( )8, ( )16.
• Convert (72)10 to ( )2, ( )8, ( )16.
• Convert (127)10 to ( )2, ( )8, ( )16.
CONVERSIONS:
• BINARY TO OTHER
• BINARY TO Decimal:
A) Multiply the digit with 2(with place value exponent). Eventually add all the
multiplication becomes the Decimal number.
• BINARY TO Octal: An easy way to convert from binary to octal is to group binary
digits into sets of three, starting with the least significant (rightmost) digits.
• Then, look up each group in a table. OR
• First convert into decimal and than divide by base 8.
• BINARY TO Hexadecimal:
• An equally easy way to convert from binary to hexadecimal is to group binary
digits into sets of four, starting with the least significant (rightmost) digits.
• Then, look up each group in a table. OR
• First convert into decimal and than divide by base 16.
Examples
• Convert ( 101101 )2= ( ? )10, ( ? )8, ( ? )16
• Convert ( 11010 )2= ( ? )10, ( ? )8, ( ? )16
• Convert ( 10101101 )2= ( ? )10, ( ? )8, ( ? )16
CONVERSIONS:
• OCTAL TO OTHER
• OCTAL TO DECIMAL
• The conversion can also be performed in the conventional mathematical way, by
showing each digit place as an increasing power of 8. (multiplication method with
base 8).
• OCTAL TO BINARY
• Converting from octal to binary is as easy as converting from binary to octal.
Simply look up each octal digit to obtain the equivalent group of three binary
digits. OR
• First convert into decimal and than divide by base 2.
• OCTAL TO HEXADECIMAL
• When converting from octal to hexadecimal, it is often easier to first convert the
octal number into binary and then from binary into hexadecimal. OR
• First convert into decimal and than divide by base 16.
Examples
• Convert ( 346 )8= ( ? )10, ( ? )2, ( ? )16
• Convert ( 721 )8= ( ? )10, ( ? )2, ( ? )16
• Convert ( 642 )8= ( ? )10, ( ? )2, ( ? )16
CONVERSIONS:
• HEXADECIMAL TO OTHER
• HEXADECIMAL TO BINARY
• Converting from hexadecimal to binary is as easy as converting from binary to
hexadecimal. Simply look up each hexadecimal digit to obtain the equivalent
group of four binary digits. OR
• First convert into decimal and than divide by base 16.
• HEXADECIMAL TO DECIMAL
• The conversion can also be performed in the conventional mathematical way, by
showing each digit place as an increasing power of 16. (multiplication method
with base 16).
• HEXADECIMAL TO OCTAL
• When converting from hexadecimal to octal, it is often easier to first convert the
hexadecimal number into binary and then from binary into octal. . OR
• First convert into decimal and than divide by base 16.
Examples
• Convert ( A2D )16= ( ? )10, ( ? )8, ( ? )2
• Convert ( EF8 )16= ( ? )10, ( ? )8, ( ? )2
• Convert (7D9 )16= ( ? )10, ( ? )8, ( ? )2