0% found this document useful (0 votes)
8 views41 pages

03-Computer-Number-System (1)

The document provides an overview of number systems, primarily focusing on the binary, decimal, octal, and hexadecimal systems. It explains how these systems represent numbers using digits and their significance in computer operations, emphasizing the binary system's efficiency in computation. Additionally, it covers binary addition and subtraction rules and procedures, along with ASCII encoding for character representation in computing.

Uploaded by

JOVANI DICIPULO
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views41 pages

03-Computer-Number-System (1)

The document provides an overview of number systems, primarily focusing on the binary, decimal, octal, and hexadecimal systems. It explains how these systems represent numbers using digits and their significance in computer operations, emphasizing the binary system's efficiency in computation. Additionally, it covers binary addition and subtraction rules and procedures, along with ASCII encoding for character representation in computing.

Uploaded by

JOVANI DICIPULO
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 41

COMPUTER

NUMBER
SYSTEM
What is Number
System • The number system is simply a
system to represent or express
numbers. There are various types
of number systems and the most
commonly used ones are

 Decimal number system


 Binary number system
 Octal number system
 Hexadecimal number system

2
What is Number
System
A computer can understand only
a few symbols called digits and
these symbols describe different
values depending on the
position they hold in the number.
In general, the binary number
system is used in computers.
However, the octal, decimal and
hexadecimal systems are also
used sometimes.

3
What is Number
System A number system
is a system representing
numbers. It is also called
the system of numeration
and it defines a set of
values to represent a
quantity. These numbers
are used as digits and the
most common ones are 0
and 1, that are used to
represent binary numbers.
Digits from 0 to 9 are used
to represent other types of
number systems. 4
Number System
Important? The number system helps to
represent numbers in a small symbol
set. Computers, in general, use
binary numbers 0 and 1 to keep the
calculations simple and to keep the
amount of necessary circuitry less,
which results in the least amount of
space, energy consumption and cost.

5
Number A number system is defined as the
Systems representation of numbers by using
digits or other symbols in a consistent
Definition manner. The value of any digit in a
number can be determined by a digit,
its position in the number, and the
base of the number system. The
numbers are represented in a unique
manner and allow us to operate
arithmetic operations like addition,
subtraction, and division.

6
There are different types of number
systems in which the four main
Types of types are as follows.

Number  Binary number system (Base – 2)


Systems  Octal number system (Base - 8)

 Decimal number system (Base - 10)

 Hexadecimal number system (Base


- 16)

7
Number System Chart
Given below is a chart of the main four types of number system that we use to represent
numbers.

Number
System

Decimal Binary Octal Hexadecimal


Numbers Numbers Numbers Numbers

Base 10 Base 2 Base 8 Base 16


(0-9) (0-1) (0-7) (0-9, A-F)

8
The decimal number system uses
ten digits: 0,1,2,3,4,5,6,7,8 and 9
Decimal with the base number as 10. The
Number decimal number system is the
System system that we generally use to
represent numbers in real life. If
any number is represented
without a base, it means that its
base is 10.

For example: 9
My base is 10
Decimal
Number
Decimal
System Number
System

I only use 0-9

10
The binary number system uses
only two digits: 0 and 1. The
Binary numbers in this system have a base
Number of 2. Digits 0 and 1 are called bits
System and 8 bits together make a byte.
The data in computers is stored in
terms of bits and bytes.
The binary number system does not
deal with other numbers such as
2,3,4,5 and so on.

11
For example: 100012, 1111012,
My base is 2
Decimal
Number
System Binary Number
System

I only use 0 & 1

12
Characteristi
cs  Uses two digits, 0 and 1

Binary  Also called as base 2 number


Number system

System  Each position in a binary number


represents a 0 power of the base
(2). Example 20

 Last position in a binary number


represents a x power of the base
(2).

Example: 2x where x represents


13
the last
Example
Binary Number: 101012

Step Binary Number Decimal Number

Step 1 101012 ((1 X 2 ) +


4 0
) 10
(0 X 23) + (1 X 22) + (0 X 21) + (1 X 2 )

Step 2 101012 (16 + 0 + 4 + 0 + 1) 10

Step 3 101012 21 10

14
15
Activity
Binary Number: 1001002
Step Binary Number Decimal Number

Step 1 100100 (1 × 2⁵) + (0 × 2⁴) + (0 × 2³) + (1 × 2²) + (0 × 2¹) + (0 × 2⁰)


Step 2 100100 (32 + 0 + 0+ 4 + 0 +0)
Step 3 100100 (36)₁₀

Binary Number:
101010
Step 2 Binary Number Decimal Number

Step 1 101010 (1 × 2⁵) + (0 × 2⁴) + (1 × 2³) + (0 × 2²) + (1 × 2¹) + (0 × 2⁰)


Step 2 101010 (32 + 0 + 8 + 0 + 2 + 0)
Step 3 101010 (42)₁₀

16
is a sequence in which each term is
Geometric found by multiplying the preceding
Sequences term by the same value. Its general
term is

a n= a 1 r n–1

17
Geometric Example: 01000001
Sequences

128 64 32 16 8 4 2 1
0 1 0 0 0 0 0 1

High-Order Bit Lower-Order Bit

18
Geometric Example: 01000001
Sequences
65

128 64 32 16 8 4 2 1
Multiply
0 1 0 0 0 0 0 1

64 Add 1

19
ASCII is the most common character encoding
format for text data in computers and on

American Standard Code for Information Interchange


the internet. In standard ASCII-encoded
data, there are unique values for 128
alphabetic, numeric or special additional
characters and control codes.

20
ASCII was the first major character encoding
standard for data processing. Most modern
computer systems use Unicode, also known as the
Unicode Worldwide Character Standard. It's a
Why is ASCII character encoding standard that includes ASCII

important? encodings.

ASCII encoding is technically obsolete, having been


replaced by Unicode. Yet, ASCII characters use the
same encoding as the first 128 characters of the
Unicode Transformation Format 8, so ASCII text is
compatible with UTF-8.

21
ASCII offers a universally accepted and
understood character set for basic data

How does ASCII


communications. It enables developers to
design interfaces that both humans and
work? computers understand. ASCII codes a
string of data as ASCII characters that can
be interpreted and displayed as readable
plain text for people and as data for
computers.

22
Programmers use the design of the

How does ASCII


ASCII character set to simplify certain
tasks. For example, using ASCII
work? character codes, changing a single bit
easily converts text from uppercase to
lowercase.

23
The capital letter "A" is represented by the
binary value:

How does ASCII 0100 0001

work? The capital letter "A" is represented by the


binary value:
0110 0001

24
 ASCII is an encoding representing
each typed character by a

Bytes and Characters number


 Each number is stored in one
to
ASCII Code byte (so the number is in 0..255)
 "Unicode" is an encoding for
mandarin, greek, arabic, etc.
languages, typically 2-bytes per
"character"
25
Binary

s p r i n g

83 112 114 105 110 103

27
BINARY
ADDITION
Binary The binary addition operation

Addition works similarly to the base 10


decimal system, except that it
is a base 2 system.

29
Rules of Binary
The four rules of binary addition
are:
Addition
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
 1 + 1 =10

30
Procedure for Binary Addition of Numbers:

101  Step 1: First consider the 1’s column, and add the one’s column,( 1+1 ) and it gives
+ 101 the result 10 as per the condition of binary addition.

 Step 2: Now, leave the 0 in the one’s column and carry the value 1 to the 10’s
1 column.
10
1
 Step 3: Now add 10’s place, 1+( 0 + 0 ) = 1. So, nothing
+ 1 00
1 carries to the 100’s place and leave the value 1 in the 10’s place

1
101  Step 4: Now add the 100’s place ( 1 + 1 ) = 10. Leave the value
+ 101
0 in the 100’s place and carries 1 to the 1000’s place.
10

1
101
+ 101
1 01 0
Activity:

101010 111110
+ 111000 + 101010
----------------- -----------------
Activity:

11 1 1 1 1 1 1
101010 111110
+ 111000 + 100010
----------------- ------------------
11 0 0 0 1 0 11 0 0 0 0 0
BINARY
SUBTRACTIO
N
Subtraction of binary numbers
Binary
is an arithmetic operation
Subtraction
similar to the subtraction of
decimal numbers or base 10
numbers.

35
Binary Subtraction Table
Binary Number Subtraction Value
0–0 0
1–0 1
0–1 1 (Borrow 1 from the next high order digit)
1–1 0

NOTE:
The addition of two binary numbers 1 and 1 is 10, where we consider 0 and carry forward 1
to the next high order. But in the case of subtraction of 1 and 1, the answer is equal to 0,
and nothing is carried forward.

In the case of decimal subtraction, when 1 is subtracted from 0, then we borrow 1 from the
next preceding number and make it 10, and after subtraction, it results in 9, i.e. 10 – 1 = 9.
But for binary subtraction, it results in 1 only.
Binary Subtraction Rules

Rules and tricks: Binary subtraction is much easier than the decimal subtraction when
you remember the following rules:

 0–0=0

 0 – 1 = 1 ( with a borrow of 1)

 1–0=1

 1–1=0
Procedure to do Binary Subtraction:
101
0
 Step 1: First consider the 1’s column, and subtract the one’s column,( 0 – 1 ) and it gives the
(-) 1 0
1 result 1 as per the condition of binary subtraction with a borrow of 1 from the 10’s place.
1
-----------
 Step 2: After borrowing 1 from the 10’s column, the value 1 in the 10’s column is changed
1 0----
1
0 into the value 0
(-) 1 0
11
-----------
1
----  Step 3: So, subtract the value in the 10’s place, ( 0 – 0 ) = 0.
101
0
(-) 1 0
0 11
-----------  Step 4: Now subtract the values in 100’s place. Borrow 1 from the 1000’s place ( 0 – 1 ) =
1 1
1----
01 1.
0
(-) 1 0
1 0 11
Activity:

101010 111110
- 111000 - 101010
----------------- -----------------
Activity:

101010 111110
- 11000 - 001010
----------------- -----------------
1 00 10 11 0 100
THANK
YOU
Ian Cristopher M. Valles
[email protected]

41

You might also like