0% found this document useful (0 votes)
20 views46 pages

Lecture 4 - Number System

The document provides an introduction to various number systems including decimal, binary, octal, and hexadecimal, explaining their characteristics and how to convert between them. It details the positional value of digits in these systems and includes examples of conversions. Additionally, it outlines steps for converting decimal numbers to other bases and includes exercises for practice.

Uploaded by

ROMMEL DORIN
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)
20 views46 pages

Lecture 4 - Number System

The document provides an introduction to various number systems including decimal, binary, octal, and hexadecimal, explaining their characteristics and how to convert between them. It details the positional value of digits in these systems and includes examples of conversions. Additionally, it outlines steps for converting decimal numbers to other bases and includes exercises for practice.

Uploaded by

ROMMEL DORIN
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

UNIVERSITY OF MAKATI

INTRODUCTION
TO COMPUTING
Prepared by: Alexander B. Pahayahay, MIT
Number System
Number System
• The technique to represent and work with
numbers
• It is simply a system to represent or express
numbers
• It is defined as the representation of numbers
by using digits or other symbols in a
consistent manner.

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


The value of each digit in a number
can be determined using :
• The digit
• The position of the digit in the number
• The base of the number system (where the base is
defined as the total number of digits available in
the number system)

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


COLLEGE OF COMPUTING AND INFORMATION SCIENCES
Decimal Number System
• Decimal number system is a base 10 number
system having 10 digits from 0 to 9.
• This means that any numerical quantity can be
represented using these 10 digits.
• Decimal number system is also a positional value
system.
• This means that the value of digits will depend
on its position.

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Example
• 734
• 971
• 207

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Example

• 1234

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


COLLEGE OF COMPUTING AND INFORMATION SCIENCES
Binary Number System
• Characteristics of the binary number system are as
follows −
• Uses two digits, 0 and 1
• Also called as base 2 number 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 the last
position - 1.

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Binary Number System

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Binary Number System

• In any binary number, the rightmost digit is called least


significant bit (LSB) and leftmost digit is called most
significant bit (MSB).

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Binary Number to Decimal Number

• Binary Number: 101012

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Step 1
• 101012
• Convert to this format:
((1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 20))10

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Step 2
• Compute and simplify: (16 + 0 + 4 + 0 + 1)10

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Step 3

• The answer is: 2110

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


chart for memory capacity conversion
• 1 byte (B) = 8 bits
• 1 Kilobytes (KB) = 1024 bytes
• 1 Megabyte (MB) = 1024 KB
• 1 Gigabyte (GB) = 1024 MB
• 1 Terabyte (TB) = 1024 GB
• 1 Exabyte (EB) = 1024 PB
• 1 Zettabyte = 1024 EB
• 1 Yottabyte (YB) = 1024 ZB

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
Octal Number System
• Characteristics of the octal number system are as follows

• Uses eight digits, 0,1,2,3,4,5,6,7
• Also called as base 8 number system
• Each position in an octal number represents a 0 power of the
base (8). Example 80
• Last position in an octal number represents a x power of the
base (8). Example 8x where x represents the last position - 1

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Octal number system

• Decimal equivalent of any octal number is sum of product


of each digit with its positional value.
• 7268 = 7×82 + 2×81 + 6×80
• = 448 + 16 + 6
• = 47010

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Example

• Octal Number: 125708

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Hexadecimal Number System
• Characteristics of hexadecimal number system are as follows

• Uses 10 digits and 6 letters, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C,
D, E, F
• Letters represent the numbers starting from 10. A = 10. B =
11, C = 12, D = 13, E = 14, F = 15
• Also called as base 16 number system
• Each position in a hexadecimal number represents a 0 power
of the base (16). Example, 160
• Last position in a hexadecimal number represents a x power
of the base (16). Example 16x where x represents the last
position - 1

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Hexadecimal Number System

• Decimal equivalent of any hexadecimal number is sum of


product of each digit with its positional value.
• 27FB16 = 2×163 + 7×162 + 15×161 + 10×160
• = 8192 + 1792 + 240 +10
• = 1023410

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Example
• Hexadecimal Number: 19FDE16

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Hexadecimal Chart

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Decimal to Other Base System
• Step 1 − Divide the decimal number to
be converted by the value of the new
base.
• Step 2 − Get the remainder from Step 1
as the rightmost digit (least significant
digit) of the new base number.
• Step 3 − Divide the quotient of the
previous divide by the new base.
COLLEGE OF COMPUTING AND INFORMATION SCIENCES
Decimal to Other Base System
• Step 4 − Record the remainder from Step 3 as
the next digit (to the left) of the new base
number.
• Repeat Steps 3 and 4, getting remainders from
right to left, until the quotient becomes zero in
Step 3.
• The last remainder thus obtained will be the
Most Significant Digit (MSD) of the new base
number.

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Example
• Decimal Number: 2910

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


• As mentioned in Steps 2 and 4, the remainders have to
be arranged in the reverse order so that the first
remainder becomes the Least Significant Digit (LSD) and
the last remainder becomes the Most Significant Digit
(MSD).
• Decimal Number : 2910 = Binary Number : 111012.

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


SEATWORK
1. Convert 30010 into the binary number system with base 2.
2. Convert 5BC16 into the decimal system.
3. Convert 1448 into the hexadecimal system
4. Convert 22310 into binary system
5. Convert (242)10 into hexadecimal.

COLLEGE OF COMPUTING AND INFORMATION SCIENCES


Answer:

1. 0001 0010 11002


2. 146810
3. 6416
4. 1101 11112
5. F216

COLLEGE OF COMPUTING AND INFORMATION SCIENCES

You might also like