0% found this document useful (0 votes)
27 views19 pages

FOC Unit 1

Unit I of the document covers the fundamental building blocks of a computer system, including its basic organization, operations, and components such as the CPU, memory, input, and output devices. It explains the IPOS cycle (Input, Processing, Output, Storage) and details the roles of various hardware components like the Arithmetic Logic Unit, Control Unit, and different types of input and output devices. Additionally, it discusses the importance of memory architecture, including RAM, cache memory, and registers in processing and storing data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views19 pages

FOC Unit 1

Unit I of the document covers the fundamental building blocks of a computer system, including its basic organization, operations, and components such as the CPU, memory, input, and output devices. It explains the IPOS cycle (Input, Processing, Output, Storage) and details the roles of various hardware components like the Arithmetic Logic Unit, Control Unit, and different types of input and output devices. Additionally, it discusses the importance of memory architecture, including RAM, cache memory, and registers in processing and storing data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Fundamentals of Programing & Problem-Solving Unit -I

UNIT – I BUILDING BLOCKS OF A COMPUTER& COMPUTER CODES

Basic organization of a computer System-Five basic operations of a computer-Basic processor and


Memory Architecture- Number System-Different types of number systems (decimal, binary, octal,
hexadecimal)-importance of binary number system-Conversion of Numbers-Popular Computer codes
(ASCII, Unicode).

I. BASIC ORGANIZATION OF A COMPUTER SYSTEM:

Any computer can perform the four basic operations of Input, Processing, Output, and Storage (IPOS).
These operations constitute the IPOS cycle. The internal design or structure of a computer may differ
from one system to another though the basic operations remain the same.

Figure 1.1 provides a block diagram of a computer. The figure displays all the functional units of a
computer which carry out the basic computer operations. The lines in the figure indicate the flow of
instructions and data, while the Control Unit and the Arithmetic/Logical Unit together direct the flow of
control in the central processing unit.

Input Unit:

 Data and instructions are entered into the computer through the input unit to get processed into
information. Input devices like the keyboard, the mouse, or the microphone are used to enter the
data.
 The data is entered in various forms depending on the type of input devices. For instance, a
keyboard can be used to input characters, numbers, and certain symbols.
 Mouse is a device that has an on-screen pointer that enables the users to select items and choose
options.
 Microphone can be used if the user wishes to enter instructions by making a voice entry.
Regardless of the ways in which the input devices receive the inputs, the input interfaces convert
them into binary codes, i.e., 0s and 1s, as the primary memory of the computer is designed to
accept data only in this format.

Page 1 of 19
Fundamentals of Programing & Problem-Solving Unit -I

 Several advancements can be seen in input devices with devices like cordless keyboards, optical
mouse, laser mouse, cordless mouse, etc., being introduced in the market.

Central Processing Unit:


 The actual processing of the data is carried out in the Central Processing Unit (CPU), which is the
brain of computer.
 The CPU stores the data and instructions in the primary memory of the computer, called the
Random Access Memory (RAM) and processes them from this location.
 The Arithmetic Logic Unit (ALU) and the Control Unit (CU) are the two subcomponents of the
CPU.
 The ALU carries out the arithmetic and logical operations while the CU retrieves the information
from the storage unit and interprets this information.
 The CPU also consists of circuitry devices called cache and registers.

Arithmetic logic unit:


 The data and instructions stored in the RAM are transferred to the ALU for processing.
 The ALU performs the logical and the arithmetic operations on the data and the results are
temporarily stored in the RAM.
 After the processing, the final results are stored in the secondary memory, i.e., the storage unit,
and are released through an output device.

Control unit:
 The CU obtains the program instructions stored in the primary memory of the computer,
interprets them, and issues signals that result in their execution.
 It helps in maintaining order and directs the operations of the entire system.
 It selects, interprets, and ensures the proper execution of the program instructions.

Output Unit:
 The output unit passes on the final results of computation to the users through the output devices
like the monitor, printer, etc.
 A monitor displays the final results of the processed data on the screen while a printer can be
used for obtaining the output in a printed format.
 These output devices link the computer with the users.
 The output interfaces convert the binary code produced by the computer into the human-readable
form.

Memory Unit:
 The main memory is referred to as the internal memory or primary memory of the computer. It is
also known as Random Access Memory (RAM).
 It is a temporary storage medium that holds the data only for a short period of time.
 Once the computer is switched off, the data stored in the RAM gets erased.
 The memory space of RAM is limited and therefore all the fi les and instructions cannot be stored in
it.
 These files and instructions are normally stored in a different location known as secondary storage
and are copied from there to the RAM before execution. This technique is referred as swapping.
Page 2 of 19
Fundamentals of Programing & Problem-Solving Unit -I

 The memory space available in RAM also affects the speed of a computer system.
 If the memory space is more, a greater number of instructions can be copied and executed at the
same time. As a result, the computer system need not read the data from the secondary storage again
and again, thus making the processing faster.
 The main memory is also responsible for holding intermediate data transferred between CPU and the
I/O devices.

II. INPUT DEVICE DEFINITION: A piece of equipment/hardware which help us enter data into a
computer is called an input device. For example, keyboard, mouse, etc.

List of Input Devices


1.Keyboard
● A simple device comprising keys and each key denotes either an alphabet, number or
number commands which can be given to a computer for various actions to be performed
● It has a modified version of typewriter keys
● The keyboard is an essential input device and computer and laptops both use keyboards to give
commands to the computer

2.Mouse
● It is also known as a pointing device
● Using mouse we can directly click on the various icons present on the system and open
up various files and programs
● A mouse comprises 3 buttons on the top and one trackball at the bottom which helps in
selecting and moving the mouse around, respectively
● In case of laptops, the touchpad is given as a replacement of mouse which helps in
the movement of the mouse pointer

3.Joy Stick
● It is a device which comprises a stick which is attached at an angle to the base, so that it can
be moved and controlled
● Mostly used to control the movement in video games
● Apart from computer system, a joystick is also used in the cockpit of an aeroplane, wheel
chairs, cranes, trucks, etc. to operate them well

4.Light Pen
● It is wand-like looking device which can directly be moved over the device’s screen
● It is light sensitive
● Used in conjunction with computer’s cathode ray tube

5.Microphone
● Using a microphone, sound can be stored in a device in its digital form
● It converts sound into electrical signal
● To record or reproduce a sound created using a microphone, it needs to be connected with an
amplifier

Page 3 of 19
Fundamentals of Programing & Problem-Solving Unit -I

6.Scanner
● This device can scan images or text and convert it into a digital signal
● When we place any piece of document on a scanner, it converts it into a digital signal
and displays it on the computer screen

7.Barcode Reader
● It is a kind of an optical scanner
● It can read bar codes
● A source of light is passed through a bard code, and its aspects and details are displayed on the
screen

III. OUTPUT DEVICE DEFINITION: A piece of equipment/hardware which gives out the
result of the entered input, once it is processed (i.e. converts data from machine language to a
human-understandable language), is called an output device. For example printer, monitor, etc.
1.Monitor
● The device which displays all the icons, text, images, etc. over a screen is called the Monitor
● When we ask the computer to perform an action, the result of that action is displayed on
the monitor
● Various types of monitors have also been developed over the years

2.Printer
● A device which makes a copy of the pictorial or textual content, usually over a paper is
called a printer
● For example, an author types the entire book on his/her computer and later gets a print out of
it which is in the form of paper and is later published
● Multiple types of printers are also available in the market, which can serve different purposes

3.Speakers
● A device through which we can listen to a sound as an outcome of what we command
a computer to do is called a speaker
● Speakers are attached with a computer system and also are an hardware device which can be
attached separately
● With advancement in technology, speakers are now available which are wireless and can be
connected using bluetooth or other applications

4.Projector
● An optical device which presents an image or moving images onto a projection screen is
called a projector
● Most commonly these projectors are used in auditoriums and movie theatres for display of
the videos or lightening
● If a projector is connected to a computer, then the image/video displayed on the screen is
the same as the one displayed on the computer screen

5.Headphones
● They perform the same function as a speaker, the only difference is the frequency of sound

Page 4 of 19
Fundamentals of Programing & Problem-Solving Unit -I

● Using speakers, the sound can be heard over a larger area and using headphones, the sound is
only audible to the person using them
● Also known as earphones or headset

IV. FIVE BASIC OPERATIONS OF A COMPUTER


1. Input
 Function: The input operation involves collecting or receiving data from the external world (like
users or other systems) and bringing it into the computer for processing.
 Examples: Keyboard, mouse, scanner, microphone, sensors, etc.
 Purpose: To allow users or systems to provide data that the computer can process.
2. Processing
 Function: Processing is the operation where the computer's central processing unit (CPU)
manipulates or processes the input data according to the instructions of a program.
 Examples: Calculations, data sorting, comparisons, logic operations.
 Purpose: To transform input data into useful output by following the program's instructions.
3. Storage
 Function: Storage refers to the saving of data, instructions, and information for future use. It
involves writing data to memory or storage devices and retrieving it when needed.
 Examples: Hard drives, SSDs, RAM, USB flash drives, cloud storage.
 Purpose: To retain data permanently or temporarily for future access or ongoing processes.
4. Output
 Function: Output involves delivering the processed data (information) to the outside world in a
readable or useful format.
 Examples: Monitors (displays), printers, speakers, projectors, and actuators.
 Purpose: To present the results of processing in a human-readable form or to another system for
further use.
5. Control
 Function: The control operation coordinates and manages the overall functioning of the computer.
It controls how the various input, processing, storage, and output operations interact with each
other, usually handled by the control unit within the CPU.
 Examples: Program execution, managing data flow, handling input/output devices, overseeing the
execution of instructions.
 Purpose: To ensure that all operations are carried out correctly, in the proper order, and at the
correct time.

V. BASIC PROCESSOR AND MEMORY ARCHITECTURE


PROCESSOR ARCHITECTURE
The function of any computer system revolves around a central component known as central processing
unit (CPU). The CPU, which is popularly referred to as the “brain” of the computer, is responsible for
processing the data inside the computer system. It is also responsible for controlling all other components
of the system.

Page 5 of 19
Fundamentals of Programing & Problem-Solving Unit -I

The main operations of the CPU include four phases:


 Fetching instructions from the memory.
 Decoding the instructions to decide what operations to be performed.
 Executing the instructions.
 Storing the results back in the memory.
This four-phase process is known as the CPU cycle. the central processing unit consists of the following
subsystems:
 Arithmetic Unit (AU)
 Logic Unit (LU)
 Control Unit (CU)
The CPU makes use of the following memory subsystems for carrying out its processing operations:
 Main Memory Unit
 Cache Memory
 Registers

Arithmetic Unit
 Arithmetic Unit (AU) is a part of the CPU that performs arithmetic operations on the data.
 The arithmetic operations can be addition, subtraction, multiplication or division.
 It handles the core calculations and logical decision-making processes needed during program
execution.
Page 6 of 19
Fundamentals of Programing & Problem-Solving Unit -I

 AU takes the input in the form of an instruction that contains an opcode, operands and the format
code.
 The opcode specifies the operation to be performed and the operands specify the data on which
operation is to be performed.
 The output of AU contains the result of the operation and the status of the result, whether it is
final or not.
 The output is stored in a storage register by the AU.
 Register is a small storage area inside the CPU from where data is retrieved faster than any other
storage area
Logic Unit
 Logic Unit (LU) is a part of the CPU that performs logical operations on the data.
 It performs 16 different types of logical operations.
 The various logical operations include greater than (>), less than (<), equal to (=), not equal to
(≠), shift left, shift right, etc.
 LU makes use of various logic gates, such as AND, OR, NOR, etc for performing the logical
operations on the data.
Control Unit
 Control Unit (CU) is an important component of CPU that controls the flow of data and
information.
 It maintains the sequence of operations being performed by the CPU.
 It fetches an instruction from the storage area, decodes the instruction and transmits the
corresponding signals to the AU or LU and the storage registers.
 CU guides the AU and LU about the operations that are to be performed and also suggests the I/O
devices to which the data is to be communicated.
 CU uses a program counter register for retrieving the next instruction that is to be executed. It
also uses a status register for handling conditions such as overflow of data
Memory Unit:
 The main memory is referred to as the internal memory or primary memory of the computer. It is
also known as Random Access Memory (RAM).
 It is a temporary storage medium that holds the data only for a short period of time.
 Once the computer is switched off, the data stored in the RAM gets erased.
 The memory space of RAM is limited and therefore all the fi les and instructions cannot be stored in
it.
 These files and instructions are normally stored in a different location known as secondary storage
and are copied from there to the RAM before execution. This technique is referred as swapping.

Cache Memory
Cache memory is a small, high-speed memory located either within the CPU or very close to it. It stores
copies of frequently accessed data and instructions from main memory.
Levels:
Primary Cache (L1 Cache): Fastest and closest to the CPU, often built into the processor.
Secondary Cache (L2 and L3 Cache): Slightly slower but still faster than main memory, located between
the CPU and main memory.
Cache reduces the time it takes to access data and instructions, improving overall processing speed by
minimizing the need to fetch data from slower main memory.
Page 7 of 19
Fundamentals of Programing & Problem-Solving Unit -I

Registers
Registers are small, high-speed storage areas within the CPU that temporarily hold data and instructions.
They provide fast access to data that the CPU is currently processing. d. A processor can have different
types of registers to hold different types of information. They include, among others:

 Program Counter (PC) to keep track of the next instruction to be executed.


 Instruction Register (IR) to hold instructions to be decoded by the control unit.
 Memory Address Register (MAR) to hold the address of the next location in the memory to be
accessed.
 Memory Buffer Register (MBR) for storing data received from or sent to CPU.
 Memory Data Register (MDR) for storing operands and data.
 Accumulator (ACC) for storing the results produced by arithmetic and logic units.

VI. Memory Architecture


 Computer memory is just like the human brain.
 It is used to store data/information and instructions.
 It is a data storage unit or a data storage device where data is to be processed and instructions
required for processing are stored.
 It can store both the input and output can be stored here.
 A computer is an electronic device and that accepts data, processes on that data, and gives the
desired output.
 It performs programmed computation with accuracy and speed.

Types of Computer Memory:


 Primary memory
 Secondary memory
 Cache memory
Page 8 of 19
Fundamentals of Programing & Problem-Solving Unit -I

Primary memory:
 It is also known as the main memory of the computer system. It is used to store data
and programs or instructions during computer operations.
Primary memory is of two types:
RAM (Random Access Memory)
ROM (Read Only Memory)

 RAM (Random Access Memory)


 It is a volatile memory.
 Volatile memory stores information based on the power supply. If the power supply
fails/ interrupted/stopped, all the data and information on this memory will be lost.
 RAM is used for booting up or start the computer. It temporarily
stores programs/data which has to be executed by the processor.
 RAM is of two types:
 S RAM (Static RAM):
S RAM uses transistors and the circuits of this memory are capable of retaining
their state as long as the power is applied. This memory consists of the number
of flip flops with each flip flop storing 1 bit. It has less access time and hence,
it is faster.
 D RAM (Dynamic RAM):
D RAM uses capacitors and transistors and stores the data as a charge on the
capacitors. They contain thousands of memory cells. It needs refreshing of
charge on capacitor after a few milliseconds. This memory is slower than S
RAM.
 ROM (Read Only Memory):
 It is a non-volatile memory.
 Non-volatile memory stores information even when there is a power supply failed/
interrupted/stopped.
 ROM is used to store information that is used to operate the system. As its name refers
to read-only memory, we can only read the programs and data that are stored on it.
 It contains some electronic fuses that can be programmed for a piece of specific
information.
 ROM is of four types:
 MROM(Masked ROM):
Hard-wired devices with a pre-programmed collection of data or instructions
were the first ROMs. Masked ROMs are a type of low-cost ROM that works in
this way.
 PROM (Programmable Read Only Memory):
This read-only memory is modifiable once by the user. The user purchases a
blank PROM and uses a PROM program to put the required contents into the
PROM. Its content can’t be erased once written.
 EPROM (Erasable Programmable Read Only Memory):
EPROM is an extension to PROM where you can erase the content of ROM by
exposing it to Ultraviolet rays for nearly 40 minutes.
 EEPROM (Electrically Erasable Programmable Read Only Memory):
Here the written contents can be erased electrically.
1. Secondary Memory
 It is also known as auxiliary memory and backup memory.
 It is a non-volatile memory and used to store a large amount of data or information.
Page 9 of 19
Fundamentals of Programing & Problem-Solving Unit -I

 The data or information stored in secondary memory is permanent, and it is slower than
primary memory.
 A CPU cannot access secondary memory directly.
2. Secondary Memory is types
 Magnetic Tapes
 Magnetic Disks
 Optical Disks
 Magnetic Tapes
It is a long, narrow strip of plastic film with a thin, magnetic coating on it that is used for
magnetic recording. Bits are recorded on tape as magnetic patches called RECORDS that run along
many tracks.
 Magnetic Disks
A magnetic disk is a circular metal or a plastic plate and these plates are coated with magnetic
material. The disc is used on both sides. Bits are stored in magnetized surfaces in locations called tracks
that run in concentric rings.
 Optical Disks
It’s a laser-based storage medium that can be written to and read.

VII. STORAGE DEVICES


There are three types of devices in which computer data can be stored. Discussed below are the same in
detail.
Magnetic Storage Devices

The most commonly used storage devices in today’s time are magnetic storage devices. These are
affordable and easily accessible. A large amount of data can be stored in these through magnetized
mediums. A magnetic field is created when the device is attached to the computer and with the
help of the two magnetic polarities, the device is able to read the binary language and store the
information. Given below are the examples of magnetic storage devices.

● Floppy Disk - Also known as a floppy diskette, it is a removable storage device which is in
the shape of a square and comprises magnetic elements. When placed in the disk reader of
the computer device, it spins around and can store information. Lately, these floppy disks
have been replaced with CDs, DVDs and USB drives
● Hard Drive - This primary storage device is directly attached to the motherboard’s disk
controller. It is an integral storage space as it is required to install any new program or application
to the device. Software programs, images, videos, etc. can all be saved in a hard drive and
hard drives with storage space in terabytes are also easily available now
● Zip Disk - Introduced by Iomega, is a removable storage device which was initially
released with a storage space of 100 MB which was later increased to 250 and then finally
750 MB
● Magnetic Strip - A magnetic strip is attached in the device comprising digital data. The most
suitable example for this is a debit card which has a strip placed on one of its sides which stores the
digital data
Optical Storage Devices

Such devices used lasers and lights to detect and store data. They are cheaper in comparison to USB drives
and can store more data. Discussed below are a few commonly used optical storage devices.

Page 10 of 19
Fundamentals of Programing & Problem-Solving Unit -I

● CD-ROM - This stands for Compact Disc - Read-Only Memory and is an external device
which can store and read data in the form of audio or software data
● Blu-Ray Disc - Introduced in 2006, Blu-ray disk was backup up by major IT and computer
companies. It can store up to 25 GB data in a single-layer disc and 50 GB data in a dual-
layer disc
● DVD - Digital Versatile Disc is another type of optical storage device. It can be readable,
recordable, and rewritable. Recordings can be done in such devices and then can be attached
to the system
● CD-R - It is a readable Compact Disc which uses photosensitive organic dye to record data
and store it. They are a low-cost replacement for storing software and applications
Flash Memory Devices

These storage devices have now replaced both magnetic and optical storage devices. They are easy to use,
portable and easily available and accessible. They have become a cheaper and more convenient option to
store data. Discussed below are the major flash memory devices which are being commonly used by the
people nowadays.

● USB Drive - Also, known as a pen drive, this storage device is small in size and is portable
and ranges between storage space of 2 GB to 1 TB. It comprises an integrated circuit which
allows it to store data and also replace it
● Memory Card - Usually attached with smaller electronic and computerized devices like
mobile phones or digital camera, a memory card can be used to store images, videos and
audios and is compatible and small in size
● Memory Stick - Originally launched by Sony, a memory stick can store more data and is
easy and quick to transfer data using this storage device. Later on, various other versions of
memory stock were also released
● SD Card - Known as Secure Digital Card, it is used in various electronic devices to store
data and is available in mini and micro sizes. Generally, computers have a separate slot to
insert an SD card. In case they do not have one, separate USBs are available in which these
cards can be inserted and then connected to the computer

VIII. NUMBER SYSTEM

Number systems are the technique to represent numbers in the computer system architecture, every value
that you are saving or getting into/from computer memory has a defined number system.

Computer architecture supports following number systems.

 Binary number system


 Octal number system
 Decimal number system
 Hexadecimal (hex) number system

BINARY NUMBER SYSTEM

A Binary number system has only two digits that are 0 and 1. Every number (value) represents with 0 and
1 in this number system. The base of binary number system is 2, because it has only two digits.

Page 11 of 19
Fundamentals of Programing & Problem-Solving Unit -I

OCTAL NUMBER SYSTEM

Octal number system has only eight (8) digits from 0 to 7. Every number (value) represents with
0,1,2,3,4,5,6 and 7 in this number system. The base of octal number system is 8, because it has only 8
digits.

DECIMAL NUMBER SYSTEM

Decimal number system has only ten (10) digits from 0 to 9. Every number (value) represents with
0,1,2,3,4,5,6, 7,8 and 9 in this number system. The base of decimal number system is 10, because it has
only 10 digits.

HEXADECIMAL NUMBER SYSTEM


A Hexadecimal number system has sixteen (16) alphanumeric values from 0 to 9 and A to F. Every
number (value) represents with 0,1,2,3,4,5,6, 7,8,9,A,B,C,D,E and F in this number system. The base of
hexadecimal number system is 16, because it has 16 alphanumeric values. Here A is 10, B is 11, C is 12,
D is 14, E is 15 and F is 16.

Number system Base(Radix) Used digits Example

Binary 2 0,1 (11110000)2

Octal 8 0,1,2,3,4,5,6,7 (360)8

Decimal 10 0,1,2,3,4,5,6,7,8,9 (240)10

Hexadecimal 16 0,1,2,3,4,5,6,7,8,9, (F0)16


A,B,C,D,E,F

IX. IMPORTANCE OF BINARY SYSTEM

 Represent all types of data in digital systems: Binary codes allow computers to represent
everything from numbers to text, images, and audio by converting data into sequences of 0s and
1s.

 Enable fast and accurate processing by computers: Binary codes help computers perform
operations like addition, subtraction, multiplication, and logical functions quickly and efficiently.

 Simplify the design of electronic circuits and systems: By using only two states (0 and 1),
binary coding reduces the complexity of circuit design, making it easier to implement and
maintain reliable systems.

 Provide efficient data transmission with minimal errors: Binary coding enhances data
transmission efficiency by simplifying signal representation, reducing the likelihood of signal
degradation, and facilitating error detection.

Page 12 of 19
Fundamentals of Programing & Problem-Solving Unit -I

 Facilitate error detection and correction in communication systems: Binary codes,


through methods like parity bits and more advanced techniques, make it possible to detect and
correct errors during data transmission or storage.

 Enable the use of Boolean logic in computing for decision-making: Binary codes work
seamlessly with Boolean logic, allowing computers to make decisions and perform logical
operations, essential for programming and algorithm design.

 Make storage and retrieval of data in memory devices more reliable: Binary coding
ensures that data can be stored in a structured, easily retrievable format in memory devices,
ensuring accuracy and consistency over time.

 Allow interoperability across various digital devices and platforms: Binary coding is
universally recognized, ensuring compatibility between different devices, systems, and
platforms, enabling seamless communication and data sharing.

 Minimize power consumption in digital circuits: Since binary codes use only two states,
they require less energy to switch between these states, resulting in reduced power consumption
in digital circuits.

 Ensure global standardization in computing and telecommunications: Binary codes


provide a universal framework for encoding and processing data, which ensures consistency and
standardization across the global tech industry.

X. CONVERSION OF NUMBERS

The computer systems accept the data in decimal form, whereas they store and process the data
in binary form. Therefore, it becomes necessary to convert the numbers represented in one
system into the numbers represented in another system.

The different types of number system conversions can be divided into the following major
categories:

 Non-decimal to decimal
 Decimal to non-decimal
 Octal to hexadecimal

Non-Decimal to Decimal

The non-decimal to decimal conversions can be implemented by taking the concept of place
values into consideration. The non-decimal to decimal conversion includes the following
number system conversions:

 Binary to decimal conversion


 Hexadecimal to decimal conversion
 Octal to decimal conversion

Page 13 of 19
Fundamentals of Programing & Problem-Solving Unit -I

Binary to decimal conversion

A binary number can be converted to equivalent decimal number by calculating the sum of
the products of each bit multiplied by its corresponding place value.

Convert the binary number 10101101 into its corresponding decimal number.

Convert the binary number 1011.010 into its equivalent in decimal system

Octal to decimal conversion

An octal number can be converted into its equivalent number in decimal system by
calculating the sum of the products of each digit multiplied by its corresponding place value.

Convert the octal number 13256 into its equivalent in decimal system

Hexadecimal to decimal conversion

Page 14 of 19
Fundamentals of Programing & Problem-Solving Unit -I

A hexadecimal number can be converted into its equivalent number in decimal system by
calculating the sum of the products of each symbol multiplied by its corresponding place
value.

Convert the hexadecimal number A53 into its equivalent in decimal system.

Decimal to non-decimal

The decimal to non-decimal conversions is carried out by continually dividing the decimal
number by the base of the desired number system till the decimal number becomes zero.
After the decimal number becomes zero, we may note down the remainders calculated at
each successive division from last to first to obtain the decimal number into the desired
system. The decimal to non-decimal conversion includes the following number system
conversions:

 Decimal to binary conversion


 Decimal to hexadecimal conversion
 Decimal to octal conversion

Decimal to binary conversion

The decimal to binary conversion is performed by repeatedly dividing the decimal number by
2 till the decimal number becomes zero and then reading the remainders from last to first to
obtain the binary equivalent of the given decimal number.

Convert the decimal number 30 into its equivalent binary number

Page 15 of 19
Fundamentals of Programing & Problem-Solving Unit -I

Decimal to octal conversion

The decimal to octal conversion is performed by repeatedly dividing the decimal number by
8 till the decimal number becomes zero and reading the remainders from last to fi rst to
obtain the octal equivalent of the given decimal number.

Convert the decimal number 45796 to its equivalent octal number

Decimal to hexadecimal conversion

Convert the decimal number 1567 into its equivalent hexadecimal number

Octal to Hexadecimal

The given octal number can be converted into its equivalent hexadecimal number in two
different steps. Firstly, we need to convert the given octal number into its binary equivalent.
Page 16 of 19
Fundamentals of Programing & Problem-Solving Unit -I

After obtaining the binary equivalent, we need to divide the binary number into 4-bit sections
starting from the LSB. The octal to binary conversion is a simple process. In this type of
conversion, we need to represent each digit in the octal number to its equivalent 3-bit binary
number

Convert the octal number 365 into its equivalent hexadecimal number.

XI. POPULAR COMPUTER CODE


a. ASCII Code (American Standard Code for Information Interchange)
The ASCII code is pronounced as ASKEE and is used for the same purpose for which the
EBCDIC code is used. Initially, this code was developed as a 7-bit BCD code to handle 128
characters but later it was modifi ed to an 8-bit code. We can check the value of any ASCII code
by just holding down the Alt key and typing the ASCII code.
For example, when we hold down the Alt key and type 66 from the keyboard, then the character
B appears on the screen. This shows that the ASCII decimal code 66 represents the character B

Page 17 of 19
Fundamentals of Programing & Problem-Solving Unit -I

b. UNICODE
 The 16-bit Unicode is an International 16-bit character set that contains a maximum of 216 =
65,536 different characters.
 These characters are sufficient to represent almost all the technical and special symbols used
by the major languages of the world.
 The 16-bit Unicode, (also called 16-bit universal character set), encodes the different
characters by assigning them a unique value. In computer terminology, this unique value is
referred as code point.
 The code assigned to each character of different languages is universal and can be used on
any platform without any modification.
 Therefore, we can say that the 16-bit Unicode allows the computer systems to deal with
almost all the characters belonging to different languages used in the world.
 The 16-bit Unicode is a character code that is supported by almost all the operating systems
such as MS Windows, Linux and Mac OS X. For example, MS Windows operating system
allows the use of all the Unicode characters through an accessory called Character Map.
 Using the Character Map window, we can select any of the Unicode character and copy it to
the clipboard. After copying it to the clipboard, we can use the selected Unicode character in
any application running under MS Windows operating system

Page 18 of 19
Fundamentals of Programing & Problem-Solving Unit -I

Page 19 of 19

You might also like