Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

Lesson 1:

Number System
and Codes
Prepared by: Kristine Joyce P. Ortiz

LEARNING OUTCOMES
1. Explain the various number systems
used with the computers including the
decimal, binary, octal, and hexadecimal
number systems (CO2)
2. Convert from one type of base number
system to another. (CO2)
3. Solve arithmetic operations including
binary and BCD arithmetic. (CO3)

Digital System
discrete elements of information
(electrical
signal
voltage,
current; electronic- transistors)

binary form
e.g. Personal Computer

Number System
1. Binary power of 2
2. Decimal base 10
3. Octal base 8
4. Hexadecimal base 16

Data Organization
Bit (Binary Digit)
smallest unit

Nibble
4 bits

Byte
8 bits, 2 nibbles

Word
16 bits, 4 nibbles, 2 bytes

NUMBER SYSTEM
CONVERSION

Decimal to Binary Conversion

Given: 19

10

Figure 1. Decimal to Binary Conversion by A.K.


Singh

Binary to Decimal
Given: 1010

Table 1. Binary to Decimal Conversion by


A.K. Singh

Binary to Octal
Given:
10110001101011

10 11 00 10 01
0 1 1 1
2
6
1
5
3
Table 2. Binary to Octal
Conversion

Binary to Hexadecimal
Given:
10110001101011

10
2

11
00
C

01
10
6

10
11
B

Table 3. Binary to Hexadecimal


Conversion

Number System
Decimal
Binary
(Base 10) (Base 2)
00
0000
01
0001
02
0010
03
____
04
0100
____
0101
06
0110
07
0111
08
1000
09
1001
10
1010

Octal
Hexadecim
( Base 8) al (Base 16)
00
0
____
1
02
2
03
3
04
4
05
5
06
6
07
7
10
8
11
9
12
____

Table 4. Numbers with different


bases

Complements

1 complement

replace all 1s to 0s and vice-versa

2s complement

look for the least significant 1, retain the value

then 1s complement the left side of the least significant 1

BINARY CODES

Binary codes

a group of n bits that assume up to 2n distinct


combinations of 1s and 0s, with each combination
representing one element of the set being coded.

Binary Codes

BCD ( Binary Coded Decimal)

Valid values: 0 - 9

Alphanumeric- ASCII (American Standard Code for


Information Interchange)

Excess 3

Gray Codes

encoding the angle of a mechanical shaft (industrial


control application)

Gray Code

Different Binary Codes


Decimal
00
01
02
03
04
____
06
07
08
09
10

BCD
0000
0001
0010
____
0100
0101
0110
0111
1000
1001
1010

Excess - 3 Gray Code


0011
0000
0100
0001
0101
0011
0110
0010
0111
____
1000
0111
1001
0101
1010
0100
1011
1100
1100
1101
0000
1111

END OF
DISCUSSION
LESSON 1 : DIGITAL SYSTEM

You might also like