Data Representation in a Computer Csc 101
Data Representation in a Computer Csc 101
Is a technology consisting of computer components and recording media used to retain digital
data. It is a core function and fundamental component of computers.
The storage unit is a part of the computer system which is employed to store the information and
instructions to be processed. A storage device is an integral part of the computer hardware which
stores information/data to process the result of any computational work. Without a storage
device, a computer would not be able to run or even boot up. Or in other words, we can say that
a storage device is hardware that is used for storing, porting, or extracting data files. It can also
store information/data both temporarily and permanently.
Pen Drive: It is also known as a USB flash drive that includes flash memory with an
integrated USB interface. We can directly connect these devices to our computers and laptops
and read/write data into them in a much faster and more efficient way. These devices are
very portable. It ranges from 1GB to 256GB generally.
SSD: It stands for Solid State Drive, a mass storage device like HDD. It is more durable
because it does not contain optical disks inside like hard disks. It needs less power as
compared to hard disks, is lightweight, and has 10x faster read and writes speed as compared
to hard disks. But, these are costly as well. While SSDs serve an equivalent function as hard
drives, their internal components are much different. Unlike hard drives, SSDs don’t have
any moving parts and thus they’re called solid-state drives. Instead of storing data on
magnetic platters, SSDs store data using non-volatile storage. Since SSDs haven’t any
moving parts, they do not need to “spin up”. It ranges from 150GB to a few more TB.
SD Card: It is known as a Secure Digital Card. It is generally used with electronic devices
like phones, digital cameras, etc. to store larger data. It is portable and the size of the SD
card is also small so that it can easily fit into electronic devices. It is available in different
sizes like 2GB, 4GB, 8GB, etc.
Memory Card: It is generally used in digital cameras. printers, game consoles, etc. It is also
used to store large amounts of data and is available in different sizes. To run a memory card
on a computer you require a separate memory card reader.
Multimedia Card: It is also known as MMC. It is an integrated circuit that is generally used
in-car radios, digital cameras, etc. It is an external device to store data/information.
The introduction of computer technology into information systems compels us to learn how
data/information are transformed or coded to facilitate their storage and processing in the
computer-based information system (CBIS).
Data can be in the form of alphabets, numbers and special symbols, which are all considered as
characters in the computer.
A number is composed of digits and there are 10 of such digits namely 0, 1, 2, 3, 4, 5, 6,7, 8, 9 in
the decimal number system. Examples of decimal numbers are 5.1, 1.26, 58.97. A data that is a
string of alphabets and numbers is called an alphanumeric data.
External data representation: This is the representation of data in the usual normal language of
the user. For example, the use of English alphabets to represent characters. When documents are
presented for coding and processing, the data in the document is in external representation for the
computer.
Internal Data Representation: Physical devices used to store and process data in computers are
two-state devices as we have in:
i. Punched cards. The two states are the presence and absence of a hole on the card.
ii. Magnetic devices: The two states are achieved when a magnetic surface is magnetized
in either one of two opposite directions.
iii. Conducting devices: The two states are achieved when the material is in conducting
mode or non-conducting mode, as in semiconductors. Thus, all data to be stored and
processed in computer are transformed or coded as strings of two symbols, one symbol
to represent each state. For convenience, let us denote the two different states by 0 and
1.
• In punched card phenomenon, 0 represents a punched hole and 1 represents not punched
• In magnetic devices, 0 represents magnetic poles aligned left to right (S N) magnetic poles
and 1 represents magnetic pole aligned right to left (N S).
• In general, for any switch (i.e. a device that can exist in two states), let 0 represent OFF and 1
represent ON.
1. BIT: These two symbols 0 and 1 representing binary digits (base two numerals), each of
which is called a BIT. Thus, a bit is the smallest unit of data in a computer system. The
string of bits is then used to code data in a computer. The number of bits in each string will
depend on the technology (i.e. architecture) of the computer involved. For example, in a 2-
bit computer, each character is represented by 2 bits. The possible characters then are 00
01 10 11. Thus, the maximum number of characters that can be processed by a 2-bit
computer is 4, i.e. 22. For a 3-bit computer, the maximum number of characters that can be
processed will be 23 = 8, and the possible unique representation of the characters is 000
001 010 011 100 101 110 111.
For a 4-bit computer, the maximum number of characters that can be processed will be 2 4
= 16 and the possible unique representation of the characters is 0000 0001 0010 0011 0100
0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111.
Assignment: Read more on ASCII (American standard code for information interchange)
2. Nibble: A group of 4 bits is called nibble.
3. Byte: a byte is defined as consisting of 8 bits i.e. 1 byte = 8 bits. This is the standard
definition of a byte. It is a representation of a character which could be an alphabet, digit,
or special character, i.e a character is made up of 8 bits.
4. Word: A computer word, like a byte, is a group of fixed number of bits processed as a
unit, which varies from computer to computer but is fixed for each computer. The length
of a computer word is called word-size or word length. It may be as small as 8 bits or may
be as long as 96 bits. A computer stores the information in the form of computer words. A
Word is defined as a combination of 2 bytes. i.e. 1 word = 2 bytes
The following table lists some higher storage units:
Kilobyte (KB)
1
1 KB = 1024 Bytes
Megabyte (MB)
2
1 MB = 1024 KB
GigaByte (GB)
3
1 GB = 1024 MB
TeraByte (TB)
4
1 TB = 1024 GB
PetaByte (PB)
5
1 PB = 1024 TB
Representation of Integers
Decimal integers are also represented in the computer in the binary form as a string of bits. A
number in binary form is said to be in base 2. Given a binary equivalent of a data (i.e. character or
number), the leftmost bit is called the most significant bit while the rightmost bit is called the least
significant bit. For example, in 10010 the leftmost bit 1 is the most significant bit while the
rightmost bit 0 is the least significant bit. Conversion of decimal numbers to binary numbers and
vice versa is done automatically by the computer. Let us illustrate how this is done manually.
Conversion is done by dividing the given number by 2 continuously and recording the remainder.
The remainders are written out from down up. While for decimals (0.25, 0.50 etc.) or decimal part
of a number, the decimal is continuously multiplied by 2, until the answer becomes 1.0.
A binary number is converted to a decimal number by attaching weights to each position and sum
the products of the weights and the bits. The weights are 20, 21, 22, 23, 24 etc. starting from the right
most bit to the leftmost bit. Then immediately after the decimal point (if any) weights are attached
from 2-1, 2-2, 2-3 etc. from the leftmost decimal digit to the rightmost.
1 X 25 + 0 X 24 + 1 X 23 + 0 X 22 + 1 X 21 + 1 X 20 + 0 X 2-1 + 1 X 2-2
= 32 + 0 + 8 + 0 + 2 + 1 + 0 + 0.25 = 43.25
Example 4: Using Binary Coded Decimal (BCD) code, convert 40010 to binary.
Example 5: Using Binary Coded Decimal (BCD) code, convert 25010 to binary
Multiply through
Multiply through