0% found this document useful (0 votes)
9 views

BA_Notes_Chapter 1. Computer Fundamentals

computer

Uploaded by

adiboss123007
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

BA_Notes_Chapter 1. Computer Fundamentals

computer

Uploaded by

adiboss123007
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

UNIT 1.

COMPUTER FUNDAMENTALS

• Introduction to Computers
In the modern era, computers are an essential part of our everyday existence. That means computers are present in almost every field, making
our day-to-day tasks easier and faster. Nowadays, computers can be seen in banks, shops, schools, hospitals, railways, and many more places,
including our home. As they are such an essential part of our lives, we must know about the basic computer introduction.

➢ What is a Computer?
It is an electronic device that can perform arithmetic operations at high speed, can store and process data, typically in binary form, according to
instructions given to it in a variable program.

Figure 1. Simple block diagram of Computer


• Historical development of computers: an evolution
Since the evolution of humans, devices have been used for calculations for thousands of years. One of the earliest and most well-known devices
was an abacus. Then in 1822, the father of computers, Charles Babbage began developing what would be the first mechanical computer. And
then in 1833 he actually designed an Analytical Engine which was a general-purpose computer. It contained an ALU, some basic flow chart
principles and the concept of integrated memory.

Then more than a century later in the history of computers, we got our first electronic computer for general purpose. It was the ENIAC, which
stands for Electronic Numerical Integrator and Computer. The inventors of this computer were John W. Mauchly and J. Presper Eckert. And
with times the technology developed and the computers got smaller and the processing got faster. We got our first laptop in 1981 and it was
introduced by Adam Osborne and EPSON.

➢ Generations of Computers
In the history of computers, we often refer to the advancements of modern computers as the generation of computers. We are currently on the
fifth generation of computers. So, let us look at the important features of these five generations of computers.

1) 1st Generation
This was from the period of 1940 to 1955. This was when machine language was developed for the use of computers. They used vacuum tubes
for the circuitry. For the purpose of memory, they used magnetic drums. These machines were complicated, large, and expensive. They were
mostly reliant on batch operating systems and punch cards. As output and input devices, magnetic tape and paper tape were implemented. For
example, ENIAC, UNIVAC-1, EDVAC, and so on.

2) 2nd Generation
The years 1957-1963 were referred to as the “second generation of computers” at the time. In second-generation computers, COBOL and
FORTRAN are employed as assembly languages and programming languages. Here they advanced from vacuum tubes to transistors. This made
the computers smaller, faster and more energy-efficient. And they advanced from binary to assembly languages. For instance, IBM 1620, IBM
7094, CDC 1604, CDC 3600, and so forth.

3) 3rd Generation
The hallmark of this period (1964-1971) was the development of the integrated circuit. A single integrated circuit (IC) is made up of many
transistors, which increases the power of a computer while simultaneously lowering its cost. These computers were quicker, smaller, more
reliable, and less expensive than their predecessors. High-level programming languages such as FORTRON-II to IV, COBOL, and PASCAL
PL/1 were utilized. For example, the IBM-360 series, the Honeywell-6000 series, and the IBM-370/168.

4) 4th Generation
The invention of the microprocessors brought along the fourth generation of computers. The years 1971-1980 were dominated by fourth
generation computers. C, C++ and Java were the programming languages utilized in this generation of computers. For instance, the STAR 1000,
PDP 11, CRAY-1, CRAY-X-MP, and Apple II. This was when we started producing computers for home use.

5) 5th Generation
These computers have been utilized since 1980 and continue to be used now. This is the present and the future of the computer world. The
defining aspect of this generation is artificial intelligence. The use of parallel processing and superconductors are making this a reality and
provide a lot of scope for the future. Fifth-generation computers use ULSI (Ultra Large-Scale Integration) technology. These are the most recent
and sophisticated computers. C, C++, Java, .Net, and more programming languages are used. For instance, IBM, Pentium, Desktop, Laptop,
Notebook, Ultrabook, and so on.

• Different functional parts of a computer and their functions


Mainly computer system consists of three parts that are central processing unit (CPU), Input Devices, and Output Devices.

1) Input Unit
-The Input Unit consists of input devices such as a mouse, keyboard, scanner, joystick, etc.These devices are used to input information or
instruction into the computer system.Like other electronic machines, a computer takes inputes as raw data (binary data) and performs necessary
processing giving out processed data.Therefore, the input uint is the medium of communication that takes data from us to the computer in an
organized manner for processing.

-The input unit performs the following major functions:


i) The input unit converts the inputted data or instructions into binary form for further processing.
ii) Input unit transmittes the data to the main memory of the computer.

Figure 2. Block Diagram of the computer


2) Storage / Memory Unit
Storage / Memory Unit is an essential part of the computer system which is used to store data and instructions before and after processing. The
memory unit transmits the information to other units of the computer system when required.

There are two types of memory units:

i) Primary Memory
The primary memory cannot store a vast amount of data. The data stored in the primary memory is temporary. The data will be lost if they are
disconnected from the power supply. The primary memory usually stores the input data and immediate calculation results. The primary memory
is also known as the Main Memory or temporary memory. Random Access Memory (RAM) is an example of primary memory.

ii) Secondary Memory (Backup Memory)


The use of primary memory is not possible to store data permanently for future access. Therefore, there are some other options to store the data
permanently for future use, which is known as secondary memory or auxiliary storage or permanent storage. The data stored in the secondary
memory is safe even when there is a power failure or no power supply. Hard Disk and SSD is usually considered a secondary memory.

Note: Primary memory is the only memory that is directly accessible to the CPU. Secondary memory is not directly accessible to the CPU. The
data accessed from the secondary unit is first loaded into RAM and then further transferred to the Processing Unit. The use of different memory
units depends entirely on the size of the data.

3) Central Processing Unit (CPU)


-The CPU is like the heart/brain of the computer. The user does not get the desired output, without the necessary option taken by the CPU. The
Central processing unit (CPU) is responsible for the processing of all the instructions which are given by the user to the computer system.
-The data is entered through input devices such as the keyboard, mouse, etc. This set of instruction is processed by the CPU after getting the input
by the user, and then the computer system produces the output. The computer can show the output with the help of output devices to the user,
such as monitor, printer, etc.
The CPU contains two parts: the arithmetic logic unit and control unit.

i) Control Unit
-As the name suggests, the control unit of a CPU controls all the activities and operations of the computer. It is also responsible for controlling
input/output, memory, and other devices connected to the CPU.
-The control unit acts like the supervisor which determines the sequence in which computer programs and instructions are executed. It retrieves
instructions from memory, decodes the instructions, interprets the instructions and understands the sequence of tasks to be performed accordingly.
-It further transmits the instructions to the other parts of the computer system to execute them. In short, the control unit determines the sequence
of operations to execute the given instructions.

ii) Arithmetic and Logical Unit


-The data inputted through input devices is stored in the primary storage unit. The Arithmetic Logic Unit (ALU) performs arithmetic and logical
operations.
-The arithmetic and logical unit is the combinational digital electronic circuit. The arithmetic unit performs arithmetic operations such as addition,
subtraction, division and multiplication on integer binary numbers.
-The logical unit controls the logical operations such as AND, OR, Equal, greater than and less than.
-The information or data is transmitted to ALU from the storage unit only when it is required. After completing the operations, the result is either
retuned to the storage unit for further processing or getting stored.

4) Output Unit
The output unit consists of devices that are used to display the results or output of processing. The output data is first stored in the memory and
then displayed in human-readable form through output devices. Some of the widely used output devices are Monitor, Printer, and Projector.
The Output Unit performs the following major functions:

i) The output unit accepts the data or information in binary form from the main memory of the computer system.
ii) The o/p unit converts the binary data into a human-readable form for better understanding.

• Types of Memory
Computer memory can be categorized into several types based on their characteristics and uses. Here are the main types of computer memory:

Figure 3. Types of Computer Memory

1) Primary Memory
Primary memory, also known as volatile memory, refers to computer memory that temporarily stores data and instructions that a computer
processor needs to access quickly. This type of memory is volatile, meaning it loses its contents when the power is turned off or interrupted.
The main types of primary memory are:
1. RAM (Random Access Memory)
o RAM is the most common type of primary memory in modern computers.
o It is used to store data and machine code that is currently being used or processed by the CPU.
o RAM allows the CPU to read and write data quickly, which is essential for running applications and operating systems efficiently.
o It is volatile, meaning it requires a constant supply of power to retain data.

Figure 4. RAM Chip

There are two main types of RAM (Random Access Memory):


i) Static RAM (SRAM)
It uses a series of transistors to store each bit of data. These transistors require a constant power supply to maintain their state, which is why
SRAM is volatile. It is faster and more expensive than DRAM. SRAM does not need to be refreshed like DRAM, making it faster but less
dense and more expensive.
ii) Dynamic RAM (DRAM)
DRAM is a specific type of RAM that stores each bit of data in a separate capacitor within an integrated circuit. However, capacitors leak
charge over time, so the data needs to be refreshed periodically (usually thousands of times per second) to maintain its accuracy., hence the
term "dynamic. DRAM is cheaper and denser than SRAM but slower.

2. ROM (Read Only Memory)


o ROM stands for Read-Only Memory.
o It is a type of non-volatile memory used primarily in computers and electronic devices to store firmware or embedded software that needs
to be permanently stored and not altered by the user.
o Data stored in ROM can only be read, not modified after the device is manufactured.

Figure 5. ROM Chip

There are several types of ROM, each with varying levels of programmability:

i) PROM (Programmable Read-Only Memory)


PROM stands for Programmable Read-Only Memory. It is a type of non-volatile memory that can be programmed (written to) once by the
user or manufacturer using a special device called a PROM programmer. Once programmed, the data stored in PROM cannot be changed or
erased, making it a type of "write-once" memory.

1) PROM chips are initially manufactured blank.


2) To program a PROM chip, a PROM programmer applies electrical pulses to specific memory cells within the chip, effectively burning
fuses or altering the state of transistors.
3) Once programmed, the data is permanently stored and cannot be altered.
4) Like other types of ROM, PROM retains its programmed data even when the power is turned off. This makes it suitable for storing
firmware, boot programs, and other essential data that must be preserved in the absence of power.

ii) Erasable Programmable ROM (EPROM)


EPROM, or Erasable Programmable Read-Only Memory, takes the concept of PROM (Programmable Read-Only Memory) a step further.
While PROMs can only be programmed once, EPROMs offer the ability to erase the existing data and then reprogram them with new
information.

1) EPROM chips are initially blank and can be programmed (written to) using a special device called an EPROM programmer.
2) Programming EPROM involves applying electrical signals to specific memory cells within the chip, typically using higher voltages than
normal operation.
3) Once programmed, the data is stored in the memory cells until it is erased.
4) EPROM retains its programmed data even when the power is turned off, like other types of ROM.
5) This makes it suitable for storing firmware, configuration settings, and other data that needs to be preserved over time.
➢ Types of EPROM
EPROM (Erasable Programmable Read-Only Memory) comes in different types based on their erasing mechanisms and technological
advancements. Here are the main types of EPROM:

a) UVEPROM (Ultraviolet Erasable Programmable ROM)


1) This is the original type of EPROM that requires exposure to ultraviolet (UV) light for erasure.
2) It has a quartz window on the top of the chip that allows UV light to penetrate and erase the memory cells.
3) Once erased, it can be reprogrammed using an EPROM programmer that applies high voltages to write data into the memory cells.

b) EEPROM (Electrically Erasable Programmable ROM)


1) EEPROMs are a type of EPROM that can be erased and reprogrammed electronically, without requiring UV light for erasure.
2) They use electrical signals to erase and program the memory cells, making them more convenient than traditional EPROMs.
3) EEPROMs have a limited number of erase/write cycles compared to EPROMs but offer the flexibility of reprogramming without
the need for UV exposure.
➢ Difference between RAM and ROM
Here's a comparison between RAM (Random Access Memory) and ROM (Read-Only Memory):

Feature RAM (Random Access Memory) ROM (Read-Only Memory)


Volatility Volatile: Loses data when power is turned off. Non-volatile: Retains data even when power is off.
Function Used for temporary storage of data and program Used for permanent storage of firmware and instructions.
code.
Read/Write Read and write operations are possible. Generally, read-only; cannot be written to after
manufacturing or specific programming.
Types Includes DRAM, SRAM, etc., with varying speed Includes PROM, EPROM, EEPROM, with different erasing
and cost. and programming mechanisms.
Usage Stores data actively used by the CPU for processing. Stores essential software instructions and data that need to be
retained.
Speed Faster access times (nanoseconds). Slower access times compared to RAM (microseconds).
Erasability Not applicable; RAM does not retain data when Types like PROM and EPROM are write-once or erasable
power is off. through specific methods (UV light, electrically).
Examples DRAM, SRAM, DDR RAM, etc. Mask ROM, PROM, EPROM, EEPROM, etc.

2) Secondary Memory (Backup Memory)


Secondary memory, also known as external storage or auxiliary memory, is a type of computer memory that is used for permanent storage
of data and programs. Unlike primary memory (RAM), which is volatile and loses its contents when the computer is turned off, secondary
memory is non-volatile and retains data even when the power is off.
Secondary storage devices are typically slower than primary memory, but they offer much larger storage capacities. This makes them ideal
for storing large files such as documents, images, videos, and other multimedia content.

1) Floppy Disk
A floppy disk, also known simply as a floppy, is a type of magnetic storage medium that was widely used from the 1970s through the 2000s
for storing digital data.

1. Physical Format
o Floppy disks are thin, flexible plastic disks coated with magnetic material inside a square or rectangular protective case.
o The most common size was 3.5 inches (90 mm) in width, though earlier versions were 5.25 inches (133 mm).
2. Storage Capacity
o Initially, floppy disks had very limited storage capacity. For example, early 5.25-inch disks could hold 360 KB (kilobytes) or 1.2
MB (megabytes) of data. Later, 3.5-inch disks could store up to 1.44 MB, with some higher-density versions reaching 2.88 MB.
o Capacity was increased through advancements in magnetic storage technology and disk formatting techniques.
3. Data Access
o Floppy disks were random-access devices, meaning any part of the data could be accessed directly without having to read through
other parts of the disk.
o Access speeds were relatively slow compared to modern storage devices.
4. Usage
o Floppy disks were used for various purposes, including:
✓ Storing and transferring files between computers.
✓ Booting up computers (as they could contain operating system and startup files).
✓ Software distribution (installing programs and games).
✓ Backing up small amounts of data.
5. Obsolescence
o Floppy disks gradually became obsolete with the advent of higher-capacity and faster storage technologies such as CD-ROMs,
USB flash drives, and online/cloud storage.
o By the early 2000s, most computers ceased to include floppy disk drives as standard equipment.

➢ Types of Floppy Disks


• 5.25-inch Floppy Disk: Introduced in the late 1970s, initially with capacities ranging from 160 KB to 1.2 MB.
• 3.5-inch Floppy Disk: Became the most common type in the 1980s and 1990s, with capacities typically starting at 720 KB and
later 1.44 MB.
• High-Density 3.5-inch Floppy Disk: These versions could store up to 2.88 MB of data, although they were less common.
2) CD-ROM
CD-ROM (Compact Disc Read-Only Memory) is a type of optical disc that can store large amounts of data. It was widely used for software
distribution, multimedia applications, and data storage from the late 1980s through the early 2000s.

1. Storage Capacity: A standard CD-ROM can hold approximately 700 MB of data or about 80 minutes of audio.
2. Read-Only: The data on a CD-ROM is written during the manufacturing process and cannot be modified or erased by the user.
3. Compatibility: CD-ROMs can be read by CD-ROM drives, which are standard in most computers, especially those manufactured in
the late 20th and early 21st centuries.
4. File Systems: Common file systems used on CD-ROMs include ISO 9660, which ensures compatibility across different computer
systems.
5. Uses: They were widely used for distributing software, games, multimedia applications, and encyclopedias before the widespread
adoption of the internet and USB flash drives.
6. Decline: With the advent of high-speed internet, digital downloads, and more advanced storage solutions like DVDs, Blu-ray discs, and
USB drives, the use of CD-ROMs has significantly declined.

➢ Types of CD-ROM
There are several types of CD-ROMs, each with specific characteristics and uses. Here are the main types:
1. CD-R (Compact Disc Recordable)
• Description: Allows users to write data once. Once recorded, the data cannot be erased or modified.
• Capacity: Typically, 700 MB.
• Usage: Data archiving, music recording, creating custom CDs.
2. CD-RW (Compact Disc Re-Writable)
• Description: Allows multiple write and erase cycles, meaning the data can be rewritten.
• Capacity: Typically, 700 MB.
• Usage: Data backup, temporary storage, and applications requiring data updates.

3) Hard Disk
A hard disk drive (HDD), also known as a hard disk or fixed disk, is a data storage device used in computers. It is a non-volatile storage
device, meaning it retains its stored data even when the computer is powered off. HDDs are the traditional and most common type of
secondary storage device used in computers.

1. History and Development


• Origins: The first hard disk drive was developed by IBM in 1956, called the IBM 305 RAMAC. It had a storage capacity of 5 MB and
consisted of 50 platters, each 24 inches in diameter.
• Evolution: Over the decades, hard disks have dramatically increased in storage capacity and decreased in physical size and cost.
2. Technical Specifications

Figure 6. Components of HDD


• Components
✓ Platters: Circular disks coated with a magnetic material where data is stored.
✓ Spindle: Rotates the platters at high speeds.
✓ Read/Write Heads: Positioned on an arm, these heads read data from and write data to the platters.
✓ Actuator: Moves the read/write heads to the correct position on the platters.
• Interface: Common interfaces include SATA (Serial ATA), PATA (Parallel ATA), and SCSI (Small Computer System Interface).
• Form Factors: Standard sizes include 3.5-inch drives for desktops and 2.5-inch drives for laptops.

3. Storage Capacity and Performance


• Capacity: Modern HDDs can store multiple terabytes (TB) of data, with some enterprise drives reaching up to 20 TB or more.
• Performance: Measured in RPM (Revolutions Per Minute), common speeds are 5400 RPM and 7200 RPM for consumer drives, while
high-performance drives may reach 10,000 RPM or 15,000 RPM.
• Data Transfer Rates: Depends on the interface and speed of the drive. Modern SATA III drives can reach up to 600 MB/s.

4. Types of Hard Disk Drives


• Internal HDDs: Installed inside the computer or server case. Used as the primary or secondary storage.
• External HDDs: Portable drives connected via USB, Thunderbolt, or eSATA. Used for additional storage, backups, and data transfer.
• Enterprise HDDs: Designed for servers and data centers, offering higher reliability, faster speeds, and larger capacities.

4) SSD (Solid State Drives)


-Solid State Drives (SSDs) are modern storage devices that use flash memory, making them faster and more reliable than traditional hard
disk drives (HDDs). Since becoming popular in the mid-2000s, they've become more affordable and are now common in many devices.

-SSDs come in various shapes and sizes, like the 2.5-inch size for laptops, M.2 sticks for thin laptops and desktops, and others for servers
and data centers. They connect to computers through different types of interfaces, with NVMe being the fastest.

-SSDs are great because they work quickly, don't break easily since they have no moving parts, use less power, and are silent. However, they
cost more per gigabyte compared to HDDs and have a limit on how many times data can be written to them, though this has been improved
over time.
-People use SSDs in their personal computers for faster performance, in data centers for quick data access, and in professional workstations
for tasks like video editing. There are also hybrid drives that combine SSD and HDD features to balance speed and storage capacity.

4) Pen drive
A pen drive, also known as a USB flash drive, is a small, portable data storage device that uses flash memory and connects to computers and
other devices via a USB port.
1. History and Development
• Origins: USB flash drives were first developed in the late 1990s and early 2000s, offering a more convenient and durable alternative to
floppy disks and CDs.
• Adoption: Quickly became popular due to their portability, ease of use, and increasing storage capacities.

2. Technical Specifications
• Components: Consist of a NAND flash memory chip, a USB connector, and a controller to manage data storage and retrieval.
• Interfaces: Most common is USB 2.0, but newer versions like USB 3.0 and USB 3.1 offer significantly faster data transfer speeds.
• Storage Capacities: Range from a few gigabytes (GB) to several terabytes (TB).

3. Advantages
• Portability: Small, lightweight, and easy to carry.
• Durability: No moving parts, making them resistant to physical damage.
• Ease of Use: Plug-and-play functionality with most modern computers and devices.
• Versatility: Compatible with a wide range of devices, including computers, tablets, smartphones (with appropriate adapters), and some
media players and gaming consoles.

4. Uses
• Data Transfer: Convenient for transferring files between computers.
• Backup and Storage: Used for backing up important data and storing large files.
• Bootable Drives: Can be used to create bootable drives for installing operating systems or running live environments.
• Media Playback: Used for storing and playing music, videos, and other media files on compatible devices.
• Cache memory

It is a small, high-speed storage area in a computer that stores copies of frequently used data and instructions. It's designed to
speed up the process of accessing data from the main memory (RAM).

i) How it Works?
Think of cache memory as a small, but extremely fast, post office. When the CPU needs data, it first checks the cache. If the data is there
(a "cache hit"), it's retrieved quickly. If not (a "cache miss"), the CPU has to go to the slower main memory to fetch it.

Figure 7. Cache memory vs Main memory

ii) Types of Cache Memory

There are primarily three types of cache memory:

L1 Cache: This is the smallest and fastest cache, located directly on the CPU. It stores data that is most likely to be used immediately.

L2 Cache: Larger than L1, it's still quite fast and often shared by multiple CPU cores.
L3 Cache: The largest and slowest of the three, it's shared by all CPU cores.

iii) Benefits of Cache Memory


• Improved system performance: By reducing the time it takes to access data, cache memory significantly boosts overall system speed.
• Reduced CPU wait states: The CPU spends less time waiting for data to be fetched from slower memory.
• Increased efficiency: By storing frequently used data closer to the CPU, cache memory optimizes data access.

• Real and Virtual Memory

➢ Real Memory

It is actual, tangible RAM (Random Access Memory) installed in your computer. It's where the operating system, applications, and
data are temporarily stored for immediate access by the CPU.
-RAM, or primary memory, in a computer, is referred to as physical memory. Physical memory is a type of volatile storage. As a result, data
retention necessitates a constant supply of electricity. Nevertheless, power outages and interruptions might cause the deletion of contents in
the physical memory. This memory is also linearly addressable. Simply said, memory addresses grow linearly.

-The CPU can access physical memory directly. It keeps programs in the execution queue. Typically, applications are stored on a hard disk.
It takes longer for the CPU to reach the hard drive to run programs. As a result, the programs are initially stored in physical memory for the
CPU to execute them more quickly.

-Accessing data via physical memory requires less time than accessing data from an HDD. After the execution finishes, the programs are
returned to the hard drive. Similarly, free memory can indeed be assigned to a new application. These programs are referred to as processes
when their execution is in progress.
• Characteristics:
o Fast access speeds
o Limited capacity
o Volatile (data is lost when power is off)

• Role

-Crucial for the computer's performance. More RAM generally leads to better multitasking and application responsiveness.

➢ Virtual Memory
It is a memory management technique used by operating systems to give the illusion of more RAM than physically exists. It utilizes a
portion of your hard drive as an extension of physical memory.

-Logical memory is virtual memory. Said otherwise, it is a way of managing the memory that the operating system employs. Virtual memory
enables developers to exploit more memory for programs than the physical memory available. If the available physical memory is 4GB while
the virtual memory is 16GB, the developer can execute the program using the 16GB virtual memory. He can use virtual memory to run
complicated applications that need more memory than the available physical one.

-Furthermore, by utilizing the hard drive, virtual memory extends the employment of physical memory. It also blocks direct access to the
main memory. Moreover, while virtual memory is accessed, its addresses are converted to physical addresses. As a result, virtual memory
protects memory.
• Benefits:
o Allows running larger applications than physically possible.
o Improves multitasking capabilities.
• Drawbacks:
o Significantly slower than physical memory.
o Excessive swapping can lead to performance issues (known as "thrashing").
• Key Differences
Feature Real Memory Virtual Memory
Nature Physical hardware Software-based illusion
Speed Fast Slow
Capacity Limited Potentially larger
Volatility Volatile Non-volatile
Role Primary storage for active data Extension of physical memory

• Binary codes: BCD numbers

BCD is a system where each decimal digit is represented by its corresponding 4-bit binary equivalent. It's essentially a way to bridge the gap
between the decimal system we use daily and the binary system computers understand.

• Key points
1) Each decimal digit (0-9) is represented by 4 bits.
2) The 4-bit representation is the direct binary equivalent of the decimal digit.
3) BCD is often used in systems that need to interact with humans, like digital clocks, calculators, and other devices that display decimal
numbers.
• Presentation of BCD
-Each decimal digit (0-9) is represented by its binary equivalent.
-A 4-bit binary number is called a nibble. BCD uses one nibble to represent each decimal digit.
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001

As you can see, the BCD representation of a decimal number is simply a concatenation of the BCD representations of its individual digits.

Example: Decimal number 259 in BCD:

2: 0010

5: 0101

9: 1001

BCD Representation: 0010 0101 1001

• Applications of BCD
i. Digital clocks
ii. Calculators
iii. Meters
iv. Other devices that display decimal numbers
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Number Systems

Two types of number systems are:

§ Non-positional number systems

§ Positional number systems

Ref Page 20 Chapter 3: Number Systems Slide 4/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Non-positional Number Systems

§ Characteristics
§ Use symbols such as I for 1, II for 2, III for 3, IIII
for 4, IIIII for 5, etc
§ Each symbol represents the same value regardless
of its position in the number
§ The symbols are simply added to find out the value
of a particular number

§ Difficulty
§ It is difficult to perform arithmetic with such a
number system

Ref Page 20 Chapter 3: Number Systems Slide 5/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Positional Number Systems

§ Characteristics

§ Use only a few symbols called digits

§ These symbols represent different values depending


on the position they occupy in the number

(Continued on next slide)

Ref Page 20 Chapter 3: Number Systems Slide 6/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Positional Number Systems


(Continued from previous slide..)

§ The value of each digit is determined by:


1. The digit itself
2. The position of the digit in the number
3. The base of the number system

(base = total number of digits in the number


system)

§ The maximum value of a single digit is


always equal to one less than the value of
the base

Ref Page 21 Chapter 3: Number Systems Slide 7/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Decimal Number System

Characteristics
§ A positional number system
§ Has 10 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7,
8, 9). Hence, its base = 10
§ The maximum value of a single digit is 9 (one
less than the value of the base)
§ Each position of a digit represents a specific
power of the base (10)
§ We use this number system in our day-to-day
life

(Continued on next slide)

Ref Page 21 Chapter 3: Number Systems Slide 8/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Decimal Number System


(Continued from previous slide..)

Example

258610 = (2 x 103) + (5 x 102) + (8 x 101) + (6 x 100)

= 2000 + 500 + 80 + 6

Ref Page 21 Chapter 3: Number Systems Slide 9/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Binary Number System

Characteristics
§ A positional number system
§ Has only 2 symbols or digits (0 and 1). Hence its
base = 2
§ The maximum value of a single digit is 1 (one less
than the value of the base)
§ Each position of a digit represents a specific power
of the base (2)
§ This number system is used in computers

(Continued on next slide)

Ref Page 21 Chapter 3: Number Systems Slide 10/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Binary Number System


(Continued from previous slide..)

Example

101012 = (1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) x (1 x 20)

= 16 + 0 + 4 + 0 + 1

= 2110

Ref Page 21 Chapter 3: Number Systems Slide 11/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Representing Numbers in Different Number
Systems

In order to be specific about which number system we


are referring to, it is a common practice to indicate the
base as a subscript. Thus, we write:

101012 = 2110

Ref Page 21 Chapter 3: Number Systems Slide 12/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Bit

§ Bit stands for binary digit

§ A bit in computer terminology means either a 0 or a 1

§ A binary number consisting of n bits is called an n-bit


number

Ref Page 22 Chapter 3: Number Systems Slide 13/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Octal Number System

Characteristics
§ A positional number system
§ Has total 8 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7).
Hence, its base = 8
§ The maximum value of a single digit is 7 (one less
than the value of the base
§ Each position of a digit represents a specific power of
the base (8)

(Continued on next slide)

Ref Page 22 Chapter 3: Number Systems Slide 14/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Octal Number System


(Continued from previous slide..)

§ Since there are only 8 digits, 3 bits (23 = 8) are


sufficient to represent any octal number in binary

Example

20578 = (2 x 83) + (0 x 82) + (5 x 81) + (7 x 80)

= 1024 + 0 + 40 + 7

= 107110

Ref Page 22 Chapter 3: Number Systems Slide 15/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Hexadecimal Number System

Characteristics
§ A positional number system
§ Has total 16 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7,
8, 9, A, B, C, D, E, F). Hence its base = 16
§ The symbols A, B, C, D, E and F represent the
decimal values 10, 11, 12, 13, 14 and 15
respectively
§ The maximum value of a single digit is 15 (one less
than the value of the base)

(Continued on next slide)

Ref Page 22 Chapter 3: Number Systems Slide 16/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Hexadecimal Number System


(Continued from previous slide..)

§ Each position of a digit represents a specific power


of the base (16)
§ Since there are only 16 digits, 4 bits (24 = 16) are
sufficient to represent any hexadecimal number in
binary

Example
1AF16 = (1 x 162) + (A x 161) + (F x 160)
= 1 x 256 + 10 x 16 + 15 x 1
= 256 + 160 + 15
= 43110

Ref Page 22 Chapter 3: Number Systems Slide 17/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Converting a Number of Another Base to a


Decimal Number

Method

Step 1: Determine the column (positional) value of


each digit

Step 2: Multiply the obtained column values by the


digits in the corresponding columns

Step 3: Calculate the sum of these products

(Continued on next slide)

Ref Page 23 Chapter 3: Number Systems Slide 18/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Converting a Number of Another Base to a


Decimal Number
(Continued from previous slide..)

Example
47068 = ?10
Common
values
multiplied
47068 = 4 x 83 + 7 x 82 + 0 x 81 + 6 x 80 by the
corresponding
= 4 x 512 + 7 x 64 + 0 + 6 x 1 digits
= 2048 + 448 + 0 + 6 Sum of these
products
= 250210

Ref Page 23 Chapter 3: Number Systems Slide 19/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Converting a Decimal Number to a Number of


Another Base

Division-Remainder Method
Step 1: Divide the decimal number to be converted by
the value of the new base

Step 2: Record the remainder from Step 1 as the


rightmost digit (least significant digit) of the
new base number

Step 3: Divide the quotient of the previous divide by the


new base

(Continued on next slide)

Ref Page 25 Chapter 3: Number Systems Slide 20/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Converting a Decimal Number to a Number of


Another Base
(Continued from previous slide..)

Step 4: Record the remainder from Step 3 as the next


digit (to the left) of the new base number

Repeat Steps 3 and 4, recording remainders from right to


left, until the quotient becomes zero in Step 3

Note that the last remainder thus obtained will be the most
significant digit (MSD) of the new base number

(Continued on next slide)

Ref Page 25 Chapter 3: Number Systems Slide 21/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Converting a Decimal Number to a Number of


Another Base
(Continued from previous slide..)

Example
95210 = ?8

Solution:
8 952 Remainder
119 s 0
14 7
1 6
0 1

Hence, 95210 = 16708

Ref Page 26 Chapter 3: Number Systems Slide 22/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Shortcut Method for Converting a Binary Number


to its Equivalent Octal Number

Method
Step 1: Divide the digits into groups of three starting
from the right

Step 2: Convert each group of three binary digits to


one octal digit using the method of binary to
decimal conversion

(Continued on next slide)

Ref Page 29 Chapter 3: Number Systems Slide 26/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Shortcut Method for Converting a Binary Number


to its Equivalent Octal Number
(Continued from previous slide..)

Example
11010102 = ?8

Step 1: Divide the binary digits into groups of 3 starting


from right

001 101 010

Step 2: Convert each group into one octal digit

0012 = 0 x 22 + 0 x 21 + 1 x 20 = 1
1012 = 1 x 22 + 0 x 21 + 1 x 20 = 5
0102 = 0 x 22 + 1 x 21 + 0 x 20 = 2

Hence, 11010102 = 1528

Ref Page 29 Chapter 3: Number Systems Slide 27/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Shortcut Method for Converting an Octal


Number to Its Equivalent Binary Number

Method
Step 1: Convert each octal digit to a 3 digit binary
number (the octal digits may be treated as
decimal for this conversion)

Step 2: Combine all the resulting binary groups


(of 3 digits each) into a single binary
number

(Continued on next slide)

Ref Page 30 Chapter 3: Number Systems Slide 28/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Shortcut Method for Converting an Octal


Number to Its Equivalent Binary Number
(Continued from previous slide..)

Example
5628 = ?2

Step 1: Convert each octal digit to 3 binary digits


58 = 1012, 68 = 1102, 28 = 0102

Step 2: Combine the binary groups


5628 = 101 110 010
5 6 2

Hence, 5628 = 1011100102

Ref Page 30 Chapter 3: Number Systems Slide 29/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Shortcut Method for Converting a Binary


Number to its Equivalent Hexadecimal Number

Method

Step 1: Divide the binary digits into groups of four


starting from the right

Step 2: Combine each group of four binary digits to


one hexadecimal digit

(Continued on next slide)

Ref Page 30 Chapter 3: Number Systems Slide 30/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Shortcut Method for Converting a Binary


Number to its Equivalent Hexadecimal Number
(Continued from previous slide..)

Example

1111012 = ?16

Step 1: Divide the binary digits into groups of four


starting from the right

0011 1101

Step 2: Convert each group into a hexadecimal digit


00112 = 0 x 23 + 0 x 22 + 1 x 21 + 1 x 20 = 310 = 316
11012 = 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20 = 310 = D16

Hence, 1111012 = 3D16

Ref Page 31 Chapter 3: Number Systems Slide 31/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Shortcut Method for Converting a Hexadecimal


Number to its Equivalent Binary Number

Method

Step 1: Convert the decimal equivalent of each


hexadecimal digit to a 4 digit binary
number

Step 2: Combine all the resulting binary groups


(of 4 digits each) in a single binary number

(Continued on next slide)

Ref Page 31 Chapter 3: Number Systems Slide 32/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Shortcut Method for Converting a Hexadecimal


Number to its Equivalent Binary Number
(Continued from previous slide..)

Example

2AB16 = ?2

Step 1: Convert each hexadecimal digit to a 4 digit


binary number

216 = 210 = 00102


A16 = 1010 = 10102
B16 = 1110 = 10112

Ref Page 32 Chapter 3: Number Systems Slide 33/40


Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha

Shortcut Method for Converting a Hexadecimal


Number to its Equivalent Binary Number
(Continued from previous slide..)

Step 2: Combine the binary groups


2AB16 = 0010 1010 1011
2 A B

Hence, 2AB16 = 0010101010112

Ref Page 32 Chapter 3: Number Systems Slide 34/40

You might also like