The Data Coding System
Computer Fundamentals and Programming
ENGR. SHEILA MAY M. LIWAG
TYPES OF COMPUTER
NUMBER SYSTEM
Lesson 1
Number system
• The number system is a way to represent or express numbers
Types of Number System
• DECIMAL Number System
—
• BINARY Number System
—
• OCTAL Number System
—
• HEXADECIMAL Number System
—
Decimal Number System
It is the most commonly used number system in the
—
world.
It is said to be the base 10 number system.
—
The mathematical term for the base of a number system is radix
Binary Number System
—ses only 2 characters.
U
—ostly used in Digital Electronics.
M
—denotes as ON and 0 denotes as OFF.
1
— ill often hear the term LSB and MSB
W
—SB – Least Significant Bit.
L
MSB – Most Significant Bit.
—
The radix or the base of a binary system is two (2).
Octal Number System
This system is a shorthand method for replacing groups
of binary digits by a single octal digit to reduce the
number of digits required in representing any number —
It has a radix or base of eight(8).
Hexadecimal Number System
From the root word hexa means 6 and deci means
—
10.
It is the number system that uses 16 characters.
—
Conversion Table
COMPUTER CODES
Lesson 2
Computer Codes
• The group of bits used to represent a symbol is called a byte
• 1 byte = 8 bits
BCD (Binary Coded Decimal System)
• BCD is a method to represent decimal numbers with 4-bit binary words
• BCD uses the words from 0000 to 1001to represent the decimal
numbers 0 to 9.
ASCII (American Standard Code for Information Interchange)
• This was originally a seven-bit code, which represented 128 (27)
different characters.
• eight-bit versions which can represent 256 characters.
• ASCII is a standardized code first developed for data communications
between computers and input/output devices.
ASCII-8 was divided into three groups:
• ASCII control characters (character code 0-31)
• ASCII printable characters (character code 32-127)
• The extended ASCII codes (character code 128-255)
EBCDIC (Extended BCD Interchange Code)
• can provide 256 (28) different coding arrangements.
Example
• The following is a message encoded in ASCII-8. What is the message?
01001000 01000101 01000001 01001100
Example
• An operator is typing in a BASIC program at the keyboard of a certain
microcomputer. The computer converts each keystroke into its ASCII
code and stores the code as a byte in memory. Determine the binary
strings that will be entered into memory when the operator types in the
following statement:
GOTO 25
THE CONVERSION OF THE
NUMBER SYSTEM
Lesson 3
Conversion of Number System
Binary
— to Decimal Decimal
— to Octal
Binary to Octal
— Decimal to Hexadecimal
—
Binary to Hexadecimal
— Octal to Decimal
—
Decimal to Binary
— Hexadecimal to Octal
—
Octal to Binary
— Octal to Hexadecimal
—
Hexadecimal to Binary
— Hexadecimal to Octal
—
Binary to Decimal
• Convert 110011002 to decimal
Binary to Decimal
• Convert 101.0112 to decimal
Binary to Octal Conversion
• 10000002 = __________ 8
Binary to Octal Conversion
• convert a fractional binary number 10011111.11012 to the octal
system
Binary to Hexadecimal Conversion
• 10000002 = __________ 16
Binary to Hexadecimal Conversion
• convert 110111001.011012 to hexadecimal
Decimal to Binary Conversion
• 1010 = __________ 2
Decimal to Binary Conversion
• 5710 = __________ 2
Short hand method: Decimal to Binary Conversion
• 1010 = __________ 2
Short hand method: Decimal to Binary Conversion
• 5710 = __________ 2
decimal fraction to a binary fraction
• 0.37510 =____ 2
decimal fraction to a binary fraction
• 0.3437510 = ______ 2
decimal fraction to a binary fraction
• 0.310 = ________ 2
Octal to Binary Conversion
• 1008 = _____________ 2
Octal to Binary Conversion
• 237.648 = _____________ 2
Hexadecimal To Binary Conversion
• 4016 = __________ 2
Hexadecimal To Binary Conversion
• 1B9.6816 = __________ 2
Decimal to Octal Conversion
• 5710 =_________ 8
Decimal to Octal Conversion
• 60.37510 = ___________ 8
Decimal to Hexadecimal Conversion
• 5710 =_________ 16
Decimal to Hexadecimal Conversion
• 60.37510 = ___________ 16
Octal to Decimal Conversion
• 718 = ________ 10
Octal to Decimal Conversion
• 74.38 = ____________ 10
Hexadecimal to Decimal Conversion
• 3916 = ________ 10
Hexadecimal to Decimal Conversion
• 3C.616 = ____________ 10
Octal to Hexadecimal Conversion
• 718 = ________ 16
Octal to Hexadecimal Conversion
• 74.38 = ____________ 16
Hexadecimal to Octal Conversion
• 3916 = ________ 8
Hexadecimal to Octal Conversion
• 3C.616 = ____________ 8
DATA MEASUREMENT
Lesson 4
Data Measurement
1 bit Binary Digit
8 bits 1 byte
1024 bytes 1 Kilobyte
1024 Kilobytes 1 Megabyte
1024 Megabytes 1 Gigabyte
1024 Gigabytes 1 Terabyte
1024 Terabytes 1 Petabyte
1024 Petabytes 1 Exabyte
1024 Exabytes 1 Zettabyte
1024 Zettabytes 1 Yottabyte