KEMBAR78
1.2 Number System Student Lecture Notes | PDF | Byte | Bit
0% found this document useful (0 votes)
406 views28 pages

1.2 Number System Student Lecture Notes

The document discusses number representation in computers. It covers binary, bits, bytes and how computers use binary to represent data. It also discusses converting between decimal and binary numbers as well as hexadecimal representation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
406 views28 pages

1.2 Number System Student Lecture Notes

The document discusses number representation in computers. It covers binary, bits, bytes and how computers use binary to represent data. It also discusses converting between decimal and binary numbers as well as hexadecimal representation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Semester 1 Session 2021/

2022

1.0 COMPUTER
SYSTEM
1.2 Number System and
Representation
1.2 Number System and Representation

Learning Outcome
At the end of the lesson, student should be able to:
(a) Explain data representation in computer
(Bit, Byte)
1.2(a) Number System and Representation
• How does computer represent data?

Convert to binary (base 2)

Image, number (base 10),


alphabet.
1.2(a) Number System and Representation
How does computer represent data?
Data & instructions can be represented electronically
by using two unique binary digits 1 (on) and 0 (off)
Eight bits is combined together to represent a
character/data.

Binary Digit Electronic Electronic


Charge State
Computer recognizes
only two discrete
electrical states
(on
on and off )
1.2(a) Number System and Representation
What is Bit?
Bit
• The smallest unit of data a computer
can process consists of 1 (on) or
0(off).
• 1 and 0 is a natural language of a
computer
1.2(a) Number System and Representation
What is Byte?
Byte
• Eight bits grouped together (e.g.:11110000) as
a unit.
• A byte provide enough different combinations of
1s and 0s to represent 256 individual characters
(digits, uppercase, lowercase letters,
punctuation marks or any symbol) in computer.
1.2(a) Number System and Representation
Common keyboard
characters and their
equivalent binary numbers
representation
1.2(a) Number System and Representation

The figure
shows how
a letter is
converted
to binary
form and
back
1.2(a) Number System and Representation
Differences between Bit and Byte
Bit Byte
Size • The smallest unit of data • Eight bits grouped together
(the amount of a computer can process as a unit to store a single
information that consist 0 (off) or 1 character up to 256
stored)
(on). individual characters

• Use to measure storage


• Use to measure data capacity. (KB,MB,GB,TB,PB)
Usage
transfer rate of computer
communications
devices.
(Kbps, Mbps, Gbps)
1.2 DATA REPRESENTATION

To measures storage capacity (Kb,Mb,Gb,Tb,Pb):-


Kera

Makan

Gajah

Terus

Pengsan

1PB = ______byte 30KB = _____TB


Bit,Byte,Kb,Mb,Gb,Tb,Pb (forward) Bit,Byte,Kb,Mb,Gb,Tb,Pb (backward)
= 1 x 1024 x 1024 x 1024 x 1024 x 1024 = 30 / 1024 / 1024 / 1024
= 1.126 x 1015 byte = 0.279 x 10-7 Terabyte
8/8/2021
Learning Outcome :
At the end of this topic, students should be able to:

1.2(b) Conversion between binary and decimal


• Convert from binary to decimal
• Convert from decimal to binary

1.2(c) Hexadecimal
• Describe why hexadecimal notation is used

11
Introduction Numbering System

Concept

A numbering system is a way of representing


numbers.

12
Introduction
Decimal Numbering System

Concept

Common numbering system used is called the


decimal numbering system / base 10 numbering
system Exp: 2310

The decimal numbering system is the numbering


system that represents all numbers using 10
symbols (0 – 9).

13
1.2(b) Binary Numbering System

Concept

The numbering system that has just two


unique digits, 0 and 1, called bits.
Exp: 10102

0 1 2 3 4 5 6 7 8 9
0000 0001 001 001 010 010 0110 0111 1000 1001
0 1 0 1
14
1.2(b) Binary Numbering System

Why?

Computer uses the binary numbering


system to represent the electronic status
of the bits in memory. It also is used for
other purposes such as addressing the
memory locations.

15
Example of Binary Number System
and the equivalent Decimal Number
System
Decimal Equivalent Binary Equivalent Decimal Equivalent Binary Equivalent
0 0000 10 1010
1 0001 11 1011
2 0010 12 1100
3 0011 13 1101
4 0100 14 1110
5 0101 15 1111
6 0110
7 0111
8 1000
9 1001

16
1.2(b) Conversion between binary and decimal
Conversion

Conversion between binary and decimal

- Convert from binary to decimal


Exp: base2 to base10

- Convert from decimal to binary


Exp: base10 to base2
17
Decimal to Binary - (base 10 to base 2)
Division – Remainder Method
(Divide by 2, find the remainder)
(2) Convert 15610 to binary
(1) Convert 2310 to binary 2 156
2 78 0
2 23
2 39 0
2 11 1 2 19 1
2 5 1 2 9 1
2 2 1 2 4 1 Ans : 100111002
2 1 0 Ans : 101112 2 2 0
0 1 2 1 0
*Read the remainder from below
0 1
18
Decimal to Binary - (base 10 to base 2)

Division – Remainder Method


(Divide by 2, find the remainder)

Try this: Convert 5610 to binary

19
Binary to Decimal - (base 2 to base 10)

Place Value Method


e.g. Convert 111012 to decimal
Step 1 1 1 0 1
1
Place value
Step (24 ) (23 ) (22) (21) (20)
2 16 8 4 2 1
16x1 8x1 4x1 2x0 1x1 = 2910

Step 16 + 8 + 4 + 0 + 1
3
20
Binary to Decimal - (base 2 to base 10)

Place Value Method


Try this: Convert 1100112 to decimal

Step 1

Step 2

Step 3

21
TO BASE
FROM BASE 10 (Decimal)

2 Place Value Method


(Binary) Step 1 1 1 0 1
1
Step (24 ) (23 ) (22) (21) (20)
Place value 2 16 8 4 2 1
16x1 8x1 4x1 2x0 1x1
=
Step 16 + 8 + 4 + 0 + 1
3 2910
FROM BASE 2
(Binary)
10
(Decimal) Division – Remainder Method
(Divide by 2, find the remainder)

22
1.2(c) Hexadecimal

Concept

The numbering system that uses 16 different


symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F).
Exp: 53D16

23
1.2© Hexadecimal Numbering
System
Why
Hexadecimal is
used?

Hexadecimal notation is a shorthand method


for representing the binary digits stored in a
computer.
e.g.:
• 11001001101000012 – can easily be misread by
people,
• hexadecimal notation groups binary digits into
units of four, which in turn are represented by other
symbols; i.e. C9A116 24
Hexadecimal Symbol Decimal Equivalent Binary Equivalent
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111
25
TRY This…

• Express 25510 in binary


number.
TRY This…
• Rina
wants to compress her
1110011012 MB file. Convert the
size of her file in decimal
numbering system.
THE END

You might also like