Chapter#1: Data Storage
Bits and Their Storage: Information
in form of 0’s & 1’s is called “bits” (short form of
Binary Digits). The bit ‘0’ stands for False Value/Off state and the
other one represents True Value/On state.
The operations that utilize these
values are known as “Boolean Operations”. Some basic operations of theme
are OR, AND, NOT & XOR.
(Act as a multiplicative operator)
(Act as an additive operator)
(Act as an inverse operator)
(Functions like OR except the outputs are same)
Gate: A device which gives the output
of any Boolean Operations when the inputs are given, called Gate.
Flip-Flops: Bistable gates/flip-flops, are
the types of circuits which is interconnected with logic gates in Integrated
Chips(IC’s). They have two states On & Off or 1 & 0; they are often
used for retrieving information. The outputs can change their states according
to rules & remains in the state until a signal is received. It’s normally
used in Electronics, Computers & Communication Technologies.
23 22 21 20
8Ones) & 4Ones) & 2Ones) & 1One)
Bit Patterns: In computers, we must deal with
0’s & 1’s; sometimes they have patterns called Bit Patterns.
The 8-bit pattern 11100110 can be
written as E6, obtained by dividing into groups of four & changing it with
their Hexa-Decimal values.
16-bits pattern= (1111111001110011)2=
long string of bits is quite often known as “Stream”.
Main Memory: A computer device contains large number of
flip-flops; each of them has a memory of single bit. This stocker refers to
machine’s main memory. A computer’s memory is in the form of cells, each
holds eight-bit (i.e. 1Byte). A typical memory cell contains only one Byte.
Most Significant Bit (MSB) 0110110001 Least Significant Bit (LSB)
computer’s main memory is quite often refers to Random Access Memory (RAM).
Every individual cell has a unique name,
known as address.
DRAM (Dynamic RAM) or SDRAM
(Synchronous DRAM) is used in illusion to DRAM that is decreases the time
elapsed to retrieve things from memory chips.
Measuring Memory Capacity: 210=1024, it is
closed to 1000, so that’s why it is neglected as Kilo.
1KB 1KiloByte 1024Bytes
1MB 1MegaByte 1024KiloBytes
1GB 1GigaByte 1024MegaBytes
1TB 1TeraBytes 1024GigaBytes
Mass Storage: Secondary/Mass Storage devices are additional memory
devices, their different classes are:
Normally called Hard
Disk-Drive/HDD (Magnetic Disk), has a spinning disk coated with magnet is
used to store data. It is a fixed disk & having non-volatile memory
that can store & retrieve data on computer.
Optical System: It is the storage method in
which data can be hold by a reflective disk by creating marks on it. Usually a
Laser Beam is used to detect/read data by checking variations on the
spinning disk. Some examples are:
(Compact Disk) 600-700MB
(Compact Disk-Digital Audio) approx.
74 minute audio or beyond (decreased pitch)
(Digital Versatile Disk) approx.
(Blu-Ray Disk) Over
five times Capacity of DVD’s
Flash Drives: It is a kind of storage, unlike
the HDD or Optical Devices, it has no moving parts. Normally used to transfer
or save data from Computers, Digital Cameras etc. Some examples are:
SD Secure Digital
SDHC SD- High Capacity
SDXC SD-Extended Capacity
Representing Information in Bit Patterns: As
all we know that computer only can understand binary language in contrast to
Human Language, that is why it retrieves information/data in term of bits &
our “Program” converts it the human readable form. (Things they
Text: ASCII (American Standard
Code for Information Interchange) uses bit-patterns of various lengths to
represent several things. The 7-bit pattern is used to represent lower
case & upper case alphabets of English language, digits 0-9, punctuation
symbols etc. They add ‘0’ at the most significant end to make a
symbol/character 8-bit. For example:
is assigned with the binary value 00101110
is assigned with the binary value 01000001
is assigned with the binary value 01100001
Representing Numeric Values: Binary notations uses value 0,
1 to represent instead of using numbers 0-9. Their lengths are shown in the
of bit (b)
of possible value (N)
of bit (b)
of possible value (N)
of bit (b)
of possible value (N)
table we derive a formula, i.e. 2b=N. By the help of this formula we
can assign numeric value in the bit-strings.
Representing Images: For image representation, computer
takes it as a collection of dots (Pixels). Each of the pixels is encrypt
& the image is taken as collection of Encrypted Pixels that is called Bit-map.
The method on which a picture is encoded/encrypted
in a bit-map depends over the application & the format of
Representing Sound: For representing sound, it is
compulsory to convert into binary code, for computers to process it. To
do this we usually record/capture sound by mice (microphone) & then
converting it into “Digital Signals”.
that the sound’s wave altitude & longitude (amplitude) taken
as numeric values & then it is changed by their binary equivalents.
The Binary System:
Binary Notations: Suppose a number in base 10
system (Commonly used system), like 8925, in this number we knows the number
‘5’ is one’s position, number ‘2’ is in ten’s position, number ‘9’ is in the
hundred’s position and the number ‘8’ is in the thousand’s position. The pattern ‘8925’ can also be written as
(8*thousand) + (9*hundred) + (2*ten) + (5*1), further we can technicalize
that (8*103) + (9*102) + (2*101) + (5*100).
In the same manners we do same thing
in binary system as shown above. In the system of ten we use ’10’ as base; same
in the binary system we take ‘2’ as base. For example:
(1*26) + (0*25) + (1*24) + (1*23) +
(1*22) + (0*21) + (1*20) = (93)10
Algorithm for converting a
positive integer into Binary System:
Divide the integer by ‘2’, & obtain the remainder.
Keep dividing the newest quotient by ‘2’ & record the remainders, until the
quotient of ‘0’ is obtained.
Binary Addition Facts:
carry of 1)
Fractions: In fractions, we use “Radix Point”
in the same manners as decimal notations. The first position after decimal to
the right gaining the quantity 1/2=1/21, second one with 1/4=1/22,
third one with 1/8=1/23 so one. For example:
+ (1*21) + (1*20). + (0/2) + (1/4) + (1/8) + (1/16)
Storing Integers: The system in which Integer is to be represented is “Two’s
Compliment notation”. It is the most popular & commonly used system. In
today’s apparatus, each integer is represented in a pattern of 32bits.
In this system, the left most bit shows the sign of the value. That is why it
is often known as “Sign Bit”.
Negative values sign bit is 1.
Non-Negative values sign bit is 0.
Storing Fractions: To store fractions, “Floating
Points” are normally used.
Programming & Data: Programming is a key to lead from formation
to executable computer programs. In programming languages, Python is a commonly
known language, which enables us for general purpose programming. It is
an interpreter, high-level & object oriented programming language.
Variables: In any programming language, a
variable is used to store/contain data. It has a value assigned by
user/coder, which depends over the condition or information of
program. Its value may be sometimes known or sometimes unknown.
Debugging is refers to a process in which
we can find/detect problems/errors in a code & then resolved. There
are many kinds of errors; some of them are shown below:
Syntax Error: (Mistake in typing code)
Run-Time Error: (Errors occurs is executing
Semantic Error: (Due to miss-considering the
intentions of a program)
Data Compression: A process/technique in which the data size is
reduced is called “Data Compression”. It has two types:
Lossless: In which the information is not
loosed in Compression Process.
Lossy: In which we leads to loose
information during the process.
Image Compression: As we have discussed images are
encoded using bit maps, unfortunately their bit maps are often larger than
expectations. To reduce their bit maps we use “Image Compression Technique”
in which an image size is reduced, without degrading their quality.
Compressing Audio/Video: To compress audio/video, the
widely used standards are developed by MPEG (Motion Picture Expert
compress a variety of encoding standard for different standard; their
techniques are beyond the scope of text.
audio they reduce their bit-rate.
video they reduce their frame-rate.
Communication Errors: When data travels to another
place, from a computer device to another server, machine in a building/across
the world, some errors occurs when the data travels through channels.
To detect or resolve these errors,
many techniques are available; a simple method is described below:
Parity Bit & Error Correcting
Code: It is
also known as Check Bit, A parity bit is added to a binary number string
to confirm that either it is odd or even. It is a simplest method for error
Parity bit enables us to detect an
error, but it can’t help in correcting these errors. To resolve it we use
patterns of codes & compare them with next received codes until we find
one, which is within the distance from received pattern.