Coding System
Coding System
Computers are constructed from electronic components that can be either on or off. Data is recorded in
computer as electronic signals in specific circuitry. Representing data within the computer is performed
by assigning a value to each group of components. These components can in one of two possible
conditions at any given time. For example, transistors are either conducting or non-conducting; switches
are either present or absent and so on. The values assigned to individual components or group of
components become the code for representing data. It uses some variations of the number system for
representing characters that may be in the form of letters, digits, or symbols. The number is a convenient
way of representing quantities as a set of symbols or codes.
The knowledge of data representation is helpful in investigating how temporary storage devices store
data and instructions. Moreover, it is also used in debugging programs, understanding how a computer
operates, and in selecting computer equipment
Objectives:
At the end of this chapter, you will be able to:
▪ Define base, weight, point, and binary point.
▪ Identify the various types of computer codes.
▪ Understand the least and most significant bit or digit in a number.
▪ Understand the step-by-step procedures in converting from one number system to another.
1. DECIMAL NUMBER SYSTEM — This is the most commonly used number system in the world. It uses
ten different characters to show the values of numbers. Because the system uses ten different
characters, it is called the base 10 system. The base of a number system tells you how many different
characters are used. The mathematical term for the base of a number system is radix. The symbols are
called Arabic numerals consisting of 10 symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). The radix or the base of a
decimal system is ten (10).
2. BINARY NUMBER SYSTEM — In many ways, this system is simpler the decimal number system because
it uses only two characters. The binary number system is used in digital electronics because digital
circuits have only two states (two signal levels). Most of the time, 0 and 1 are the two characters used.
This is ideal for computer processing because the “1”is used to denote electrical pulse or signal and "0"
is used to denote the absence of such signal. The binary notations “0" and "1" are called bits, which is
acronym for BInary digiTs. Often when referring to binary you will hear the terms "LSB" (least
significant bit) and "MSB" (most significant bit). These are very much like terms we use when speaking
of decimal numbers. In decimal numbers we refer to most significant digit (MSD) and least significant
digit (LSD). The LSB is the bit with least weight. The MSB is the bit with the greatest weight. Normally,
binary numbers are shown with the MSB as the leftmost bit.
3. OCTAL NUMBER SYSTEM - This system is shorthand method for replacing groups of binary digits by
single octal digit to reduce the number of digits required in representing any number. It has a radix or
base of eight (8), consisting of 0, 1, 2, 3, 4, 5, 6, 7.
4. HEXADECIMAL NUMBER SYSTEM - refers to the base 16 number system in which 16 different
characters are used, consisting of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Why is the hexadecirnal numbering system used? We know that no electronic system uses 16 different
levels in the way that binary electronics uses two different levels. This system is not required by the
B. CONVERSION TABLE
C. COMPUTER CODES
The internal circuitry of a computer needs to represent only binary ones and zeros in its operations.
However, several binary-based coding systems have been devised to express the machine language
instruction codes executed by the CPU and to represent the characters of data processed by the
computer. These computer codes make the job of communicating with a computer easier and more
efficient. They should be considered as shorthand methods of expressing the binary patterns within a
computer.
1. BCD (Binary Coded Decimal System) - A method to represent decimal numbers with 4-bit binary
words. BCD uses the words from 0000 to 1001 to represent the decimal numbers O to 9. It uses 0001
0000 to 1001 1001 to represent decimal numbers 10 to 99. Each decimal digit will be represented
using 4-bit binary word.
Parity bit
bit representing alpha, numeric and special character
This was originally a seven-bit code, which represented 128 (27) different characters. However, eight-bit
versions (sometimes called ASCII-8), which can represent 256 characters, are now widely used. ASCII is
a standardized code first developed for data communications between computers and input/output
devices. However, it is used by most microcomputers and minicomputers, as well as by many larger
computers. ASCII has been as a code by national and international standards organizations.
ASCII-8 was divided into three groups.
▪ ASCII control characters (character code 0-31) - The first 32 characters in the ASCII-table are
unprintable control codes and are used to control peripherals such as printers.
▪ ASCII printable characters (Character code 32-127) - Codes 32-127 are common for all the
different variations of the ASCII table, they are called printable characters, represent letters,
digits, punctuation marks, and a few miscellaneous symbols. You will find almost every character
on your keyboard. Character 127 represents the command DEL.
▪ The extended ASCII codes (character code 128-255) - There are several different variations of
the 8-bit ASCII table. Codes 129-159 contain the Microsoft@ Windows Latin-1 extended
characters.
Example:
These terms are usually used in the world of computing to describe disk space, or data storage space,
and system memory. For instance, just a few years ago people were describing hard drive space using
the term Megabytes. Today, Gigabytes is the most common term being used, to describe the size of a
hard drive. In the not so distant future, Terabyte will be common term. But what are they? This is where
it gets confusing because there are at least three accepted definitions of each term.
According to the IBM Dictionary of computing, when used to describe disk storage capacity, a megabyte
is 1,000,000 bytes in decimal notation. But when the term megabyte is used for real and virtual storage,
and channel volume, 2 to the 20th power or 1,048,576 bytes is the appropriate notation. According to
the Microsoft to the Microsoft Press Computer Dictionary, a megabyte means either 1,000,000 bytes or
1,048,576 bytes. According to Eric S. Raymond in the New Hacker’s Dictionary, a megabyte is always
1,048,576 bytes on the augment that bytes should naturally be computed in power of two. So which
definition do most people conform to?
When referring to a megabyte for disk storage, the hard drive manufacturers use the standard that a
megabyte is 1,000,000 bytes. This means that when you buy an 80 Gigabyte Hard drive you will get total
of 80,000,000,000 bytes of available storage.
This is where it gets confusing because Windows uses the 1,048,576byte rule so when you look at the
Windows drive properties an 80 Gigabyte drive will report a capacity of 74.56 Gigabytes and a 250
Gigabyte drive will only yield 232. Gigabytes of available storage space.
The 1000 can be replaced with 1024 and still be correct using the other acceptable standards. Both of
these standards are correct depending on what type of storage you are referring.
Bit: A Bit is the smallest unit of data that a computer uses. It can be used to represent two states of
information, such as 1 or 0.
Byte: A byte is equal to 8 Bits. A Byte can represent 256 states of information, for example, numbers or
a combination of numbers and letters. 1 Byte could be equal to one character as discussed in ASCII-8
representation. 10 Bytes could be equal to a word. 100 bytes would be equal an average sentence.
Kilobyte: A Kilobyte is approximately 1,000 Bytes, actually 1,024 Bytes depending on which definition is
used. 1 Kilobyte would be equal to this paragraph you are reading, whereas 100 Kilobytes would equal
an entire page.
Gigabytes: A Gigabyte is approximately 1,000 Megabytes. A Gigabyte is still a very common term used
these days when referring to disk space or drive storage. 1 Gigabyte of data is almost twice the amount
of data that a CD-ROM can hold. But it’s about one thousand times the capacity of 3-1/2 inch floppy disk.
1 Gigabyte could hold the contents of about 10 yards of books on a shelf. 100 Gigabytes could hold the
entire library floor of academic journals.
Terabyte: A Terabyte is approximately one trillion bytes, or 1,000 Gigabytes. To put it in some
perspective, a Terabyte could hold about 3.6 million 300 Kilobyte images or maybe about 300 hours of
good quality video. A Terabyte could hold 1,000 copies of the Encyclopedia Britannica. Ten Terabytes
could hold the printed collection of the Library of Congress. That’s a lot of data.
Petabyte: A Petabyte is approximately 1,000 Terabytes or one million Gigabytes. It’s hard to visualize
what a Petabyte could hold. 1 Petabyte could hold approximately 20 million 4-door filing cabinets full of
text. It could hold 500 billion pages of standard printed text. It would take about 500 million floppy disks
to store the same amount of data.
Exabyte: An Exabyte is approximately 1,000 Petabytes. Another way to look at it is that an Exabyte is
approximately one quintillion bytes or one billion Gigabytes. There is not much to compare an Exabyte
to. It has been said that 5 Exabytes would be equal to all of the words ever spoken by mankind.
Zettabyte: A Zettabyte is approximately 1,000 Exabytes. There is nothing to compare a Zettabyte to but
to say that it would take a whole lot of ones and zeroes to fill it up.
Yottabyte: A Yottabyte is approximately 1,000 Zettabytes. It would take approximately 11 trillion years
to download a Yottabyte file from the Internet using high-power broadband. You can compare it to the
World Wide Web as the entire Internet almost takes up about a Yottabyte.
Example: