0% found this document useful (0 votes)
45 views25 pages

Unit 1 Bca Coa

The document provides an overview of basic computer organization, detailing the components of the Von Neumann architecture, including the input unit, output unit, storage unit, CPU, ALU, and control unit. It explains the memory hierarchy, differentiating between primary and secondary memory, and discusses types of RAM and ROM. Additionally, it covers input and output devices, highlighting their functions and examples.

Uploaded by

Sarla Jangir
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)
45 views25 pages

Unit 1 Bca Coa

The document provides an overview of basic computer organization, detailing the components of the Von Neumann architecture, including the input unit, output unit, storage unit, CPU, ALU, and control unit. It explains the memory hierarchy, differentiating between primary and secondary memory, and discusses types of RAM and ROM. Additionally, it covers input and output devices, highlighting their functions and examples.

Uploaded by

Sarla Jangir
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/ 25

UNIT 1

Basic Computer Organization, Units of a computer, CPU, ALU, memory hierarchy, registers,
input-output devices
Basic Architecture of Computer
Over the several years the size, processing speed, cost and reliability of computers has changed. But,
the basic structure of computer is still the same as was given by Von Neumann in the year 1945 has
not changed. According to Von Neumann architecture of computer every digital
computer with these components:
1. Input Unit
2. Output Unit
3. Storage Unit
4. Arithmetic Logic Unit
5. Control Unit
Storage unit

Input Unit
Input unit connects the external environment with internal computer system. It provides data and
instructions to the computer system. Commonly used input devices are keyboard, mouse, magnetic
tape, scanner, webcam, joystick etc. Input unit performs following tasks:
 Accept the data and instructions from the outside environment.
 Convert it into machine language.
 Supply the converted data to computer system.

Output Unit
It connects the internal system of a computer to the external environment. It provides the results of
any computation, or instructions to the outside world. Some output devices are printers, monitor,
plotter, speaker etc. Input Unit Secondary
Storage Unit
This unit holds the data and instructions. It also stores the intermediate results before these are sent to
the output devices. It also stores the data for later use. The storage unit of a computer system can be
divided into two categories:
 Primary Storage: This memory is used to store the data which is being currently executed. It
is used for temporary storage of data. The data is lost, when the computer is switched off.
RAM and ROM are used as primary storage memory.
 Secondary Storage: The secondary memory is slower and cheaper than primary memory. It
is used for permanent storage of data. Commonly used secondary memory devices are hard
disk, CD etc.
CPU (Central Processing Unit)
It is Central Processing Unit of the computer. The control unit and ALU are together known as CPU.
CPU is the brain of computer system. It performs following tasks:
 It performs all operations.
 It takes all decisions.
 It controls all the units of computer
Arithmetic Logical Unit
All the calculations are performed in ALU of the computer system. The ALU can perform basic
operations such as addition, subtraction, division, multiplication etc. Whenever calculations are
required, the control unit transfers the data from storage unit to ALU. When the operations are done,
the result is transferred back to the storage unit.
Control Unit
It controls all other units of the computer. It controls the flow of data and instructions to and from the
storage unit to ALU. Thus it is also known as central nervous system of the computer.
Memory Units
Computer store data in binary format, binary format contain only two characters 0 and 1. All the
information stored/represented in the computer is a code which contain a specific combination of 0’s
and 1’s. The memory units are used to measure the size of ddata in computer. The memory units are as
follow.
1. Smallest Memory Unit – Bit ( Binary Digit)
2. Nibble – 4 bits
3. Byte or 1B- 8 Bites
4. Kilobyte or 1KB – 1024 bytes or 210 bytes
5. Megabyte or 1 MB – 1024 Kilobyte or 220 bytes
6. Gigabyte or 1 GB – 1024 MB or 230 bytes
7. Terabyte or 1 TB- 1024 GB or 240 bytes
8. Petabyte or 1 PB- 1024 TB or 250 bytes
9. Exabyte or 1 EB – 1024 PB or 260 bytes
10. Zetta or 1ZB – 1024 EB or 270 bytes
11. Yotta or 1 YB- 1024 ZB or 280 bytes

Memory Hierarchy Design and its Characteristics


Computer memories are broadly divided into two types
1. External Memory or Secondary Memory
directly with the CPU due to their slow speed in comparison to CPU. Examples of external memory :
Magnetic Disk, Optical Disk, Magnetic Tape
2. Internal Memory or Primary Memory
CPU. Examples of internal memory: Cache Memory & CPU registers. On the basis of storage
capacity, access time and cost per bit the various types of memories can be divided into 5 Levels:
Level 0 - CPU Registers: Processor registers computer's CPU. Registers usually consist of a small
amount of fast specific hardware functions, and may be read
Level 1 - Cache Memory: Cache future requests for that data can be served faster; the data stored in a
cache might be the result of an earlier computation or a copy of data stored elsewhere. Cache is made
up of SRAM (Static Random access Memory).
Level 2 - Main Memory: Main memory is used to store the data and instruction that are to be executed
by the CPU. It also store the results obtained after the processing of instructions. RAM and ROM are
two types of main memory.
Level 3 - Magnetic Disk Storage: data on the surface of one or more rotating disks by using magnetic
mechanism are two categories of magnetic disk storage.
Level 4 – Optical Disk and Magnetic Tape: access of data. These memories are mostly used for
backup and archiving purpose.
As indicated in the
diagram, the storage
capacity and access time
increases as we move
down the memory
hierarchy levels where as
the cost per bit to store
increase as we move up in
the memory hierarchy
levels.
Main Memory Organisation
Main memory/ primary memory or Internal Memory stores the data and instruction that can be
directly executed by the CPU. Primary memory store data in specific locations called memory
location. Each memory location is identified by a unique number called mthat can be transferred to
and from main memory is called memory word.
Primary Memory is of Two Types.
1. RAM (Random Access Memory)
The main characteristics of RAM are as follow:
 The word “random” refers to the fact that any memory location of RAM can be accessed at
constant time regardless the physical location.
 RAM is Volatile or Temporary in nature i.e. Once the system is switched off, the information
stored on RAM gets erased.
 RAM is read and write memory,it can be read as well as write as per the processing
requirements.
 RAM is a semiconductor memory and is very costly in comparison to secondary memory.
 RAM size is limited, the storage size of RAM available these days varies from MB’s to GB’s.
Example 512 MB, 1GB, 2GB, 4GB,8GB etc.

RAM are of two types


 DRAM (Dynamic RAM): In this memory the data is continuously refreshed because
Dynamic RAM looses data in few milliseconds, It stores data in the form of charge on
capacitor which leaks away in short time. Dynamic memory is slower and cheaper than Static
RAM.
 SRAM (Static RAM): In this memory data remained stored without the need of periodic
refresh. Static RAM store uses transistors for data storage; Static RAM is fast and costly as
compare to DRAM. One of the most popular example of SRAM is Cache memory.

SRAM DRAM

It stores information as long as the


It stores information as long as the power is power is supplied or a few
supplied. milliseconds when the power is
switched off.
SRAM DRAM

Transistors are used to store Capacitors are used to store data in


information in SRAM. DRAM.

To store information for a longer time,


Capacitors are not used hence no
the contents of the capacitor need to
refreshing is required.
be refreshed periodically.

SRAM is faster compared to DRAM. DRAM provides slow access speeds.

It does not have a refreshing unit. It has a refreshing unit.

These are expensive. These are cheaper.

SRAMs are low-density devices. DRAMs are high-density devices.

In this bit is stored in the form of


In this bit are stored in voltage form.
electric energy.

These are used in cache memories. These are used in main memories.

Consumes less power and generates Uses more power and generates more
less heat. heat.

SRAMs has lower latency DRAM has more latency than SRAM

SRAMs are more resistant to radiation DRAMs are less resistant to radiation
than DRAM than SRAMs

SRAM has higher data transfer rate DRAM has lower data transfer rate

SRAM is used in high-speed cache DRAM is used in lower-speed main


memory memory

SRAM is used in high performance DRAM is used in general purpose


applications applications
2. ROM (Read Only Memory):
ROM is built in memory of a computer system. It is very small in size and store firmware, which store
instruction which are necessary to run or boot the system.
The main characteristics of ROM are as follow:
 It is a read only memory, we cannot write into it.
 ROM is non volatile or permanent memory, The data and instructions does not get erased
when the computer power is switched off.
 In ROM data/instruction are accessed in sequence, Random access is not possible.
 Instruction stored in ROM is executed automatically as soon as computer is switched on.
There are mainly 3 types of ROM’s
PROM (Programmable Read only Memory): These ROM’s are programmed by computer
programmers for some special purposes. Once they are programmed the data gets stored in them
permanently.
EPROM (Erasable Programmable Read only Memory): The data stored in EPROM’s can be
erased by using Ultra Violet (UV) rays and these ROM chips can be reprogrammed.
EEPROM (Electrically Erasable Programmable Read only Memory):The data stored in
EEPROMs can be erased completely / partially electrically and new data can be stored on them.

Difference Random Access Memory (RAM) Read Only Memory (ROM)

RAM is a volatile memory that could ROM is a non-volatile memory that the
Data-Retention store the data as long as the power is could retain the data even when the power
supplied. is turned off.

Read and write operations are


Read/Write Only read operations are supported.
supported.

It is typically used to store firmware or


Used to store the data that has to be
microcode, which is used to initialize and
Use currently processed by CPU
control hardware components of the
temporarily.
computer.

Speed It is a high-speed memory. It is much slower than the RAM.


Difference Random Access Memory (RAM) Read Only Memory (ROM)

CPU CPU can easily access data stored in CPU cannot easily access data stored in
Interaction RAM. ROM.

Size and Large size with higher capacity, Small size with less capacity, concerning
Capacity concerning ROM. RAM.

Used as/in CPU Cache , Primary memory. Firmware, Micro-controllers.

The data stored is not as easily accessible


Accessibility The data stored is easily accessible.
as in the concerning RAM.

Cost RAM is more costlier than ROM. ROM is cheaper than RAM.

A RAM chip can store only a few A ROM chip can store multiple megabytes
Chip Size
gigabytes (GB) of data. (MB) of data.

Used for the temporary storage of data Used to store firmware, BIOS, and other
Function
currently being processed by the CPU. data that needs to be retained.

Secondary Memory/ Secondary Storage Devices :


Primary memory has two main limitations: Limited storage capacity and volatility. To overcome these
limitations almost all computers use additional memory called secondary or auxiliary memory.
Secondary memory is permanent, cheap and provides high storage capacity. There are two methods of
accessing information from secondary storage devices : direct access and sequential access.
In sequential access the desired information is accessed by searching the data in the sequential
manner starting from the first record until the desired record is found, thus the access time here
depends upon the distance of the desired information from the beginning.
In direct access method the information is directly fetched from its storage location. In this case
search time is independent from the location of the data storage.
Examples Sequential Access : Magnetic Tape
Direct Access : Magnetic Disk, CD/DVD/ Pen Drive, Memory Card etc.

Brief information about the most common secondary storage devices :


Magnetic Disks: Magnetic disks are the most popular direct access secondary storage devices. A
magnetic disk is made up of a thin circular plate / platter of metal or plastic. Its surface on both sides
has a coating of magnetic material such as iron oxide that can record data by magnetization. Data is
recorded on its coated surface as tiny magnetized and non magnetized spots (Represents 0 and 1).
Storage organization
A magnetic disk’s surface has a number of invisible, concentric circles called tracks. A magnetic disk
also has a pie shaped segments. If there are eight such segments than each track has eight parts. Each
part of the track is called a sector. Typically a sector contains 512 bytes and every sector has a unique
address. Magnetic disks store data in EBCDIC (Extended Binary coded decimal Interchange Code).

The disk drive has an access arm assembly having read/write heads for each recordable surface of the
disk pack. All access arms of the assembly moves together, for fast data access the disk packs use the
concept of cylinder for data organization. A set of corresponding tracks on all recording surfaces of a
disk pack together form a cylinder.

Input and Output Devices


An input/output device, often known as an IO device, is any hardware that allows a human operator or
other systems to interface with a computer. Input/output devices, as the name implies, are capable of
delivering data (output) to and receiving data from a computer (input). An input/output (I/O) device is
a piece of hardware that can take, output, or process data. It receives data as input and provides it to a
computer, as well as sends computer data to storage media as a storage output.
Input Devices
Input devices are the devices that are used to send signals to the computer for performing tasks. The
receiver at the end is the CPU (Central Processing Unit), which works to send signals to the output
devices. Some of the classifications of Input devices are:
 Keyboard Devices
 Pointing Devices
 Composite Devices
 Game Controller
 Visual Devices
 Audio Input Devices
Some of the input devices are described below.

Keyboard
The keyboard is the most frequent and widely used input device for entering data into a computer.
Although there are some additional keys for performing other operations, the keyboard layout is
similar to that of a typical typewriter.
Generally, keyboards come in two sizes: 84 keys or 101/102 keys but currently keyboards with 104
keys or 108 keys are also available for Windows and the Internet.
Keyboard
Types of Keys
 Numeric Keys: It is used to enter numeric data or move the cursor. It usually consists of a set
of 17 keys.
 Typing Keys: The letter keys (A-Z) and number keys (09) are among these keys.
 Control Keys: These keys control the pointer and the screen. There are four directional arrow
keys on it. Home, End, Insert, Alternate(Alt), Delete, Control(Ctrl), etc., and Escape are all
control keys (Esc).
 Special Keys: Enter, Shift, Caps Lock, NumLk, Tab, etc., and Print Screen are among the
special function keys on the keyboard.
 Function Keys: The 12 keys from F1 to F12 are on the topmost row of the keyboard.
Mouse
The most common pointing device is the mouse. The mouse is used to move a little cursor across the
screen while clicking and dragging. The cursor will stop if you let go of the mouse. The computer is
dependent on you to move the mouse; it won’t move by itself. As a result, it’s an input device.
A mouse is an input device that lets you move the mouse on a flat surface to control the coordinates
and movement of the on-screen cursor/pointer. The left mouse button can be used to select or move
items, while the right mouse button when clicked displays extra menus.

Joystick
A joystick is a pointing device that is used to move the cursor on a computer screen. A spherical ball
is attached to both the bottom and top ends of the stick. In a socket, the lower spherical ball slides.
You can move the joystick in all four directions. The joystick’s function is comparable to that of a
mouse. It is primarily used in CAD (Computer-Aided Design) and playing video games on the
computer.
Joystick Mouse
Track Ball
Track Ball is an accessory for notebooks and laptops, which works on behalf of a mouse. It has a
similar structure to a mouse. Its structure is like a half-inserted ball and we use fingers for cursor
movement. Different shapes are used for this like balls, buttons, or squares.
Light Pen
A light pen is a type of pointing device that looks like a pen. It can be used to select a menu item or to
draw on the monitor screen. A photocell and an optical system are enclosed in a tiny tube. When the
tip of a light pen is moved across a monitor screen while the pen button is pushed, the photocell
sensor element identifies the screen location and provides a signal to the CPU.
Scanner
A scanner is an input device that functions similarly to a photocopier. It’s employed when there’s
information on paper that needs to be transferred to the computer’s hard disc for subsequent
manipulation. The scanner collects images from the source and converts them to a digital format that
may be saved on a disc. Before they are printed, these images can be modified.

Light Pen Scanner

Optical Mark Reader (OMR)


An Optical Mark Reader is a device that is generally used in educational institutions to check the
answers to objective exams. It recognizes the marks present by pencil and pen.
Optical Character Reader (OCR)
OCR stands for optical character recognition, and it is a device that reads printed text. OCR optically
scans the text, character by character turns it into a machine-readable code, and saves it to the system
memory.
Magnetic Ink Card Reader (MICR)
It is a device that is generally used in banks to deal with the cheques given to the bank by the
customer. It helps in reading the magnetic ink present in the code number and cheque number. This
process is very fast compared to any other process.
Bar Code Reader
A bar code reader is a device that reads data that is bar-coded (data that is represented by light and
dark lines).Bar-coded data is commonly used to mark things, number books, and so on. It could be a
handheld scanner or part of a stationary scanner. A bar code reader scans a bar code image, converts it
to an alphanumeric value, and then sends it to the computer to which it is connected.
Web Camera
Because a web camera records a video image of the scene in front of it, a webcam is an input device.
It is either built inside the computer (for example, a laptop) or attached through a USB connection. A
webcam is a computer-connected tiny digital video camera. It’s also known as a web camera because
it can take images and record video. These cameras come with software that must be installed on the
computer in order to broadcast video in real-time over the Internet. It can shoot images and HD
videos, however, the video quality isn’t as good as other cameras (In Mobiles or other devices or
normal cameras).

Bar Code Readere Web Camera


Digitizer
Digitizer is a device that is used to convert analog signals to digital signals. it converts signals into
numeric values. An example of a Digitizer is Graphic Tablet, which is used to convert graphics to
binary data.
Microphone
The microphone works as an input device that receives input voice signals and also has the
responsibility of converting it also to digital form. It is a very common device that is present in every
device which is related to music

Output Devices:-
Output Devices are the devices that show us the result after giving the input to a computer system.
Output can be of many different forms like image, graphic audio, video, etc. Some of the output
devices are described below.
Monitor
Monitors, also known as Visual Display Units (VDUs), are a computer’s primary output device. It
creates images by arranging small dots, known as pixels, in a rectangular pattern. The amount of
pixels determines the image’s sharpness. The two kinds of viewing screens used for monitors are
described below.
 Cathode-Ray Tube (CRT) Monitor: Pixels are minuscule visual elements that make up
a CRT display. The higher the image quality or resolution, the smaller the pixels.
 Flat-Panel Display Monitor: In comparison to the CRT, a flat-panel display is a type of
video display with less volume, weight, and power consumption. They can be hung on the
wall or worn on the wrist.
Flat-panel displays are currently used in calculators, video games, monitors, laptop computers, and
graphical displays.
Television
Television is one of the common output devices which is present in each and every house. It portrays
video and audio files on the screen as the user handles the television. Nowadays, we are using plasma
displays as compared to CRT screens which we used earlier.
Printer
Printers are output devices that allow you to print information on paper. There are certain types of
printers which are described below.
 Impact Printers
 Character Printers
 Line Printers
 Non-Impact Printers
 Laser Printers
 Inkjet Printers
Monitor Printer
Impact Printer
Characters are printed on the ribbon, which is subsequently crushed against the paper, in impact
printers. The following are the characteristics of impact printers:
 Exceptionally low consumable cost.
 Quite noisy
 Because of its low cost, it is ideal for large-scale printing.
 To create an image, there is physical contact with the paper.

Character Printers
Character Printer has the capability to print only one character at a time. It is of two types.
 Dot Matrix Printer
 Daisy Wheel
Line Printers
Line Printers are printers that have the capability to print one line at a time. It is of two types.
 Drum Printer
 Chain Printer

Non-Impact Printers
Characters are printed without the need for a ribbon in non-impact printers. Because these printers
print a full page at a time, they’re also known as Page Printers. The following are the characteristics
of non-impact printers:
 Faster
 They don’t make a lot of noise.
 Excellent quality
 Supports a variety of typefaces and character sizes

Laser Printers
Laser Printers use laser lights for producing dots which will produce characters on the page.
Inkjet Printers
Inkjet printers are printers that use spray technology for printing papers. High-quality papers are
produced in an Inkjet printer. They also do color printing.
Speakers
Speakers are devices that produce sound after getting a command from a computer. Nowadays,
speakers come with wireless technology also like Bluetooth speakers.
Projector
Projectors are optical devices that have the work to show visuals on both types of screens, stationary
and moving both. It helps in displaying images on a big screen. Projectors are generally used in
theatres, auditoriums, etc.
Plotter
Plotter is a device that helps in making graphics or other images to give a real view. A graphic card is
mandatorily required to use these devices. These are the pen-like devices that help in generating exact
designs on the computer.
Braille Reader
Braille Reader is a very important device that is used by blind users. It helps people with low vision or
no vision to recognize the data by running their fingers over the device to understand easily. It is a
very important device for blind persons as it gives them the comfort to understand the letters,
alphabets, etc which helps them in study.

Video Card
A video Card is a device that is fitted into the motherboard of the computer. It helps in improvising
digital content in output devices. It is an important tool that helps people in using multiple devices.
Global Positioning System (GPS)
Global Positioning System helps the user in terms of directions, as it uses satellite technology to track
the geometrical locations of the users. With continuous latitudinal and longitudinal calculations, GPS
gives accurate results. Nowadays, all smart devices have inbuilt GPS.
Headphones
Headphones are just like a speaker, which is generally used by a single person or it is a single-person
usable device and is not commonly used in large areas. These are also called headsets having a lower
sound frequency.
The Input and Output Devices of a Computer
There are so many devices that contain the characteristics of both input and output. They can perform
both operations as they receive data and provide results. Some of them are mentioned below.
USB Drive
USB Drive is one of the devices which perform both input and output operations as a USB Drive
helps in receiving data from a device and sending it to other devices.
Modem
Modems are one of the important devices that helps in transmitting data using telephonic lines.
CD and DVD
CD and DVD are the most common device that helps in saving data from one computer in a particular
format and send data to other devices which works as an input device to the computer.
Headset
The headset consists of a speaker and microphone where a speaker is an output device and a
microphone works as an input device.
Facsimile
A facsimile is a fax machine that consists of a scanner and printer, where the scanner works as an
input device and the printer works as an output device.

Difference Between Input and Output devices

Input Device Output Device

It accepts data from user. It reflects processed data to user.

It is directly commanded by user. It is commanded by processor.

It converts user friendly instruction into machine


It converts machine’s instructions to user intelligible.
friendly.

It takes the data from the user and sends it to the It takes the processed data from the processor and
processor for execution. sends it back to the user.

It helps the computer is accepting the data. It helps the computer is displaying the data.

The design of input devices are more complex. The design of output devices are less complex.

Ex: Keyboard, Image Scanner, Microphone,


Ex: Monitor, Printers, Plotters, Projector, Speakers.
Pointing device, Graphics tablet, Joystick.

Number System
A number system relates quantities and symbols.In digital system how information is represented is
key
and there are different radices, i.e. number bases, that a numbering system can use.
1.1 Digital computer
Any class of devices capable of solving problems by processing information in discrete form.It
operates on data,including letters and symbols,that are expressed in binary form i.e using only two
digits 0 and 1.
The block diagram of digital computer is given below:
The memory unit stores programs as well as input, output and intermediate data. The processor unit
performs arithmetic and other data processing tasks as specified by the program. The control unit
supervises the flow of information between various units. The program and data prepared by the user
are transferred into the memory unit by means of an input device such as punch card reader (or) tele
typewriter. An output device, such as printer, receives the result of the computations and the printed
results are presented to the user.

1.2 Number Representation:


It can have different base values like: binary (base-2), octal (base-8), decimal (base 10) and
hexadecimal (base 16),here the base number represents the number of digits used in that numbering
system. As an example, in decimal numbering system the digits used are: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
Therefore the digits for binary are: 0 and 1, the digits for octal are: 0, 1, 2, 3, 4, 5, 6 and 7. For the
hexadecimal numbering system, base 16, the digits are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
2. Binary numbers
Numbers that contain only two digit 0 and 1 are called Binary Numbers. Each 0 or 1 is called a Bit,
from binary digit. A binary number of 4 bits is called a Nibble. A binary number of 8 bits is called a
Byte. A binary number of 16 bits is called a Word on some systems, on others a 32-bit number is
called a Word while a 16-bit number is called a Halfword.
Using 2 bit 0 and 1 to form
a binary number of 1 bit, numbers are 0 and 1
a binary number of 2 bit, numbers are 00, 01, 10, 11
a binary number of 3 bit, such numbers are 000, 001, 010, 011, 100, 101, 110, 111
a binary number of 4 bit, such numbers are 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000,
1001, 1010, 1011, 1100,1101,1110,1111
Therefore, using n bits there are 2n binary numbers of n bits
Each digit in a binary number has a value or weight. The LSB has a value of 1. The second from the
right
has a value of 2, the next 4 , etc.,
3. Number Base Conversions
3.1 Conversion of decimal number to any number system
Step 1 convert the integer part by doing successive division using the radix of asked number systems.
Step 2 convert the fractional part by doing successive multiplication using radix of asked number
system
3.2 Conversion of decimal to binary number system
The radix of asked number system is 2 - Convert (87)10 to ( )2

1st Multiplication Iteration Multiply 0.625 by 2


0.625 x 2 = 1.25(Product) Fractional part=0.25 Carry=1 (MSB)
2nd Multiplication Iteration Multiply 0.25 by 2
0.25 x 2 = 0.50(Product) Fractional part = 0.50 Carry = 0
3rd Multiplication Iteration Multiply 0.50 by 2
0.50 x 2 = 1.00(Product) Fractional part = 1.00 Carry = 1 (LSB)
(101)2
The binary number of (14.625)10 is (1110.101)2
3.3 Conversion of decimal to octal number system
The radix of asked number system is 8
Convert (264)10 decimal number to octal number

(410)8
The octal number of (264)10 is (410)8

Convert (105.589)10 decimal number to octal number

The octal number of (105.589)10 is (151.4554)8

3.4 Conversion of decimal to Hexadecimal number system


The radix of asked number system is 16
Convert (1693)10 decimal number to Hexadecimal number
1693/16 = 105 Reminder (13) D (LSB)
105/16 = 6 Reminder 9
6/16 = 0 Reminder 6 (MSB)
(1693)10 =(69D)16
Convert (1693.0628)10 decimal fraction to hexadecimal fraction (?)16
1693/16 = 105 Reminder (13) D (LSB)
105/16 = 6 Reminder 9
6/16 = 0 Reminder 6 (MSB)
(69D)
Multiply 0.0628 by 16
0.0628 x 16 = 1.0048(Product) Fractional part=0.0048 Carry=1 (MSB)
Multiply 0.0048 by 16
0.0048 x 16 = 0.0768(Product) Fractional part = 0.0768 Carry = 0
Multiply 0.0768 by 16
0.0768 x 16 = 1.2288(Product) Fractional part = 0.2288 Carry = 1
Multiply 0.2288 by 16
0.2288 x 16 = 3.6608(Product) Fractional part = 0.6608 Carry = 3 (LSB)
(.1013)
(1693.0628)10 = (69D.1013)16

3.5 Conversion of any number system to decimal number system


In general the numbers can be represented as
N= A n-1r n-1 + = A n-2r n-2 +……..+ A1 r1 + A0 r0 + A-1 r-1+ A-2 r-2+………
Where n= number in decimal
A= digit
r= radix of number system
n= The number of digits in the integer portion of number
m= the number of digits in the fractional portion of number

3.6 Conversion of binary to decimal number system


Convert ( 101.101 )2= ( ? )10
3.7 Conversion of octal to decimal number system
Convert (128)8= ( ? )10

3.8 Conversion of hexadecimal to decimal number system


Convert (E F. B 1)16= (?)10

Convert ( 0.9D9 )16= ( ? )10


= 0 x 16+0. 9 x 16-1 + D x 16-2 + 9 x 16-3
= 0 +1. 9 x ( 1 / 16 ) + 13 x ( 1 / 256 ) + 9 x ( 1 / 4096 )
= 0 + (0. 5625) + (0. 050781) + (0. 0021972 )
= 0+ (0. 6154782 )
= 0. 6154782

3.9 Conversion of binary to octal number system


Convert (101101001)2 to ( )8
Divide the binary into group of three digits from LSB we will find the following pattern
101|101|001 Now writing the equivalent decimal number of each group we get 5 | 5 | 1 So the
equivalent octal number is 5518
Convert 11001100.101 to ( )8
011|001|100. |101|
314.5
So the equivalent octal number is 314.5

3.10 Conversion of binary to hexadecimal number system


Convert 111100010 to ( )16
Divide the binary into group of four digits from LSB
0001|1110|0010
Now writing the equivalent hexadecimal number of each group
1|E|2
So the equivalent Hexa decimal number is 1E216

Convert 11000011001.101 to ( )16


0110|0001|1001|.1010|
619.A
So the equivalent Hexa decimal number is 619.A16

3.11 Conversion of octal number system to hexa decimal number system


Convert ( 25)8 to ( )16
First convert octal to binary
The binary equivalent of 25 is 010101
Divide the binary into group of four digits from LSB
0001|0101
15
So the equivalent Hexa decimal number is 1516

3.12 Conversion of hexa decimal number system to octal number system

Convert ( 1A.2B)16 to ( )8
First convert hexadecimal to binary
The binary equivalent of 1A.2B is 00011010.00101011
Divide the binary into group of Three digits
011|010|.|001|010|110
32.126
so the equivalent octal number is 32.1268

4. COMPLEMENTS
In digital computers to simplify the subtraction operation and for logical manipulation complements
are used . There are two types of complements for each radix system the radix complement and
diminished radix complement. The first is referred to as the r’s complement and the second as the (r-
1)’s complement.

r’s Complement
Given a positive number N in base r with an integer part of n digits, the r’s complement of N is
defined as rn-N if N≠0 and 0 if N=0

(r-1)’s Complement
Given a positive number N in base r with an integer part of n digits and a fraction part of m
digits, the (r-1)’s complement of N is defined as rn-r-m-N

Subtraction with r’s complement


 The direct method of subtraction uses the borrow concept
 When subtraction is implemented by means of digital components, this method is found to be
less efficient. So, instead the following procedure can be followed.
The subtraction of two positive numbers (M-N), both of base r, may be done as follows.
(1) Add the minuend M to the r’s complement of the subtrahend N.
(2) Inspect the result obtained in step 1 for an end carry.
 If an end-carry occurs, discard it.
 If an end-carry does not occurs, take the r’s complement of the number obtained in step 1 and
place a negative sign in front.

Subtraction with (r-1)’s Complement


 The procedure for subtraction with (r-1)’s complement is same as r’s complement except for
end-around carry.
 The subtraction of M-N, both positive numbers in base r, may be calculated in the following
manner.
1. Add the minuend M to the (r-1)’s complement of the subtrahend N.
2. Inspect the result obtained in step 1 for an end carry.
 If an end-carry occurs, add 1 to the least significant digit (end-around carry)
 If an end-carry does not occur, take the (r-1)’s complement of the number obtained in step 1
and place a negative sign in front.
It is classified into four types they are 1’s complement , 2’s complement , 9’s complement and
10’s complement.

1’s complement representation:


The 1’s complement of a binary number is the number that results when we change all 1’s to zeros and
the zeros to ones.

2’s complement representation:


The 2’s complement is the binary number that results when we add 1 to the 1’s complement.

Problems related to 1’s complement and 2’s complement :


BINARY ARITHMETIC
BINARY ADDITION

The binary addition table is as follows:

1+1 0 1
Illustration 1:
Add (1010)2 and (0011)2
1010 (Augend)
0011 (Addend)
-----------------------
1101 (sum)
-----------------------
The addition manipulated above as follows.
Step 1: The least significant bits are added, i.e. 0+1 =1 with a carry of 0
Step 2: The carry in the previous is added to the next higher significant bits, i.e. 0+1+1= 0 with a
carry 1.
Step 3: The carry in the previous is added to the next higher significant bits, i.e. 1+0+0 =1 with a
carry 0.
Step 4: The preceding carry is added to the most significant bit i.e. 0+1+0 = 1 with a carry 0. Thus the
sum is 1101.

BINARY SUBTRACTION
The binary subtraction table is as follows:

Illustration 1:
Subtract (0101)2 from (1011)2
1011 (Minuend)
0101 (Subtrahend)
---------------------------
0110 (Difference)
---------------------------
The steps are described below
Step1: the LSB in the first column are 1 and 1. Hence, the difference is 1 - 1 = 0
Step2: The column, the subtraction is performed as 1 – 0 = 1
Step3: In the third column, the difference is given by 0 – 1 =1
Step 4: In the fourth column (MSB), the difference is given by 0 – 0 = 0 since 1 is borrowed for third
column.

Arithmetic operations with Signed Numbers


 Here, we use 2’s complement representation
Addition
 The two numbers in an addition are the addend and the augend.
 The result is sum.
 There are four cases that can occur when two signed binary numbers are added.
(1) Both numbers positive.
(2) Positive number with magnitude larger than negative number.
(3) Negative number with magnitude larger than positive number
(4) Both numbers negative.
Subtraction
 It is a special case of addition.
 The two numbers in subtraction are subtrahend and minuend.
 The result is the difference.
 To subtract +6 from +9, it is also equivalent to add -6 to +9.
 So, to subtract two signed numbers, take the 2’s complement of the subtrahend and add. Discard
any final carry bit.

You might also like