CS111 - Lecture Note 01b
CS111 - Lecture Note 01b
Computing
(CS111)
Junar A. Landicho
[email protected]
“
The way to get started is
to quit talking and begin
doing.
Walt Disney
Topic 1:
Number System
Conversion
Objectives
By the end of this topic, students will be able to:
Understanding decimal, binary, octal and hexadecimal numbers.
Counting in decimal, binary, octal and hexadecimal systems.
Convert a number from one number system to another system.
Advantage of octal and hexadecimal systems.
Example:
1x 10
=0 1
5 6 2 1 1
2 x 10 = 20
103 102 101 100
6 x 102 = 600
5 x 103 = 5000
CS 111 – Introduction to Computing
Binary Number System
The binary number system is also a
positional numbering system
01
Instead of using ten digits, 0-9, the binary
system uses only two digits, 0 and 1.
The binary system is also known as base 2.
The values of the position are calculated by
taking 2 to some power.
Why is the base 2 for binary numbers?
▪ Because we use 2 digits, the digits 0 and 1.
1 011
11111111
1 0 1 1
23 22 21 20
00000000
123
574 5 7 4
602 82 81 80
Hexadecimal: 1D63A7A
Most significant digit Least significant digit
Solution:
Solution:
Solution:
Solution:
1 001 1 01
26 25 24 23 22 21 20