Computer Codes
Computer Codes
DATA FORMATS
Computers
Process and store all forms of data in binary format
Human communication
Includes language, images and sounds
Data formats:
Specifications for converting data into computer-
usable form
Define the different ways human data may be
represented, stored and processed by a computer
INTRODUCTION
Real World Computer
Data Input device Data
10101010
Digital
10110010…
Camera
SOURCES OF DATA
Binary input
Begins as discrete input
Example: keyboard input such as A 1+2=3 math
Keyboard generates a binary number code for each key
Analog
Continuous data such as sound or images
Requires hardware to convert data into binary numbers
Computer
A 1+2=3 math Input
device
1101000101010101…
STANDARDS ORGANIZATIONS
Types
Integer (whole number)
Real (contains a decimal point)
DATA TYPES: ALPHANUMERIC
Alphanumeric:
Characters: b T
Number digits: 7 9
Punctuation marks: ! ;
Special-purpose characters: $ &
Four standards for representing letters (alpha) and
numbers
BCD – Binary-coded decimal
EBCDIC – Extended binary-coded decimal interchange code
ASCII – American standard code for information interchange
Unicode
COMPUTER CODES
❑A computer is a digital system that stores and processes different
types of data in the form of 0s and 1s.
❑The different types of data handled by a computer system
include numbers, alphabets and some special characters.
❑Therefore, there is a need to change the data entered by the
users into a form that the computer system can understand and
process.
❑Different types of codes have been developed and used to
represent the data entered by the users in the binary format.
❑The binary system represents each type of data in terms of
binary digits, 0s and 1s.
❑Since these codes convert the data into the binary form, the
computer codes are also referred as binary codes.
BINARY SYSTEM TERMS
The following are some of the technical terms used in binary system:
Bit: It is the smallest unit of information used in a computer system. It can
either have the value 0 or 1. Derived from the words Binary ditIT.
Nibble: It is a combination of 4 bits.
Byte: It is a combination of 8 bits.
Word: It is a combination of 16 bits.
Double word: It is a combination of 32 bits.
Kilobyte (KB): It is used to represent the 1024 bytes of information.
Megabyte (MB): It is used to represent the 1024 KBs of information.
Gigabyte (GB): It is used to represent the 1024 MBs of information.
BINARY CODED DECIMAL (BCD)
SYSTEMS
4-BIT BINARY CODED DECIMAL
(BCD) SYSTEMS
4-BIT BINARY CODED DECIMAL
(BCD) SYSTEMS
The BCD system is employed by computer systems to
encode the decimal number into its equivalent binary
number.
This is generally accomplished by encoding each digit of
the decimal number into its equivalent binary sequence.
The main advantage of BCD system is that it is a fast and
efficient system to convert the decimal numbers into binary
numbers as compared to the pure binary system.
4-BIT BINARY CODED DECIMAL
(BCD) SYSTEMS
The 4-bit BCD system is usually employed by the computer
systems to represent and process numerical data only. In
the 4-bit BCD system, each digit of the decimal number is
encoded to its corresponding 4-bit binary sequence. The
two most popular 4-bit BCD systems are:
ASCII EBCDIC
Space 2016 4016
A 4116 C116
b 6216 8216
ASCII CODE
❑The ASCII code is pronounced as ASKEE and is used for the
same purpose for which the EBCDIC code is used. However, this
code is more popular than EBCDIC code as unlike the EBCDIC
code this code can be implemented by most of the non-IBM
computer systems.
C FF FS , < L \ l |
D CR GS - = M ] m }
E SO RS . > N ^ n ~
F SI US / ? O _ o DEL
WHAT IS MSD & LSD?
In a whole number the LSD will always be the digit immediately to the
left of the radix point.
HOW ?
UNICODE