You are on page 1of 30

Computer Logical Organization

Naseem Ahmed Khan


Introduction

Computers control everything from heart pacemakers to aircraft, putting


everyone at risk when they fail. Computer-related failures regularly cause
disruption, damage and occasionally death.
A recent example is the WannaCry ransomware attack, which hit computers
around the world, notably in the National Health Service in the UK . This
attack was made possible by a specific defect, MS17-010, affecting several
versions of the Windows operating system.
Many such failures are caused by carelessness and could be prevented by
the introduction of more disciplined development methods. The ultimate
discipline is to use formal logic and mathematics to prove the correctness
of designs.
What is Logic?
Logic is a tool to develop reasonable conclusions based on a given set
of data. Logic is free of emotion and deals very specifically with
information in its purest form. Logic began as a philosophical term and
is now used in other disciplines like math and computer science. 

Computer Logic:
Computer logic is an aspect of
computer design concerning
the fundamental operations
and structures upon which all
computer systems are built.
Digital Electronics:
In the modern world of electronics, the term Digital is generally associated with a
computer because the term Digital is derived from the way computers perform operation, by
counting digits. For many years, the application of digital electronics was only in the
computer system. But now-a-days, digital electronics is used in many other applications.
Following are some of the examples in which Digital electronics is heavily used.
• Industrial process control
• Military system
• Television
• Communication system
• Medical equipment
• Radar
• Navigation
Signal
Signal can be defined as a physical quantity, which contains some
information. It is a function of one or more than one independent
variables. In electronics and telecommunications, it refers to any time
varying voltage, current or electromagnetic wave that carries
information. A signal may also be defined as an observable change in a
quality such as quantity. Signals are of two types.
• Analog Signal
• Digital Signal
Analog Signal
An analog signal is defined as the signal having continuous values. Analog
signal can have infinite number of different values. In real world scenario, most of
the things observed in nature are analog. Examples of the analog signals are
following.
• Temperature Graphical representation of Analog Signal (Temperature)

• Pressure

 
• Distance
• Sound
• Voltage
                                                                    
• Current
• Power
Digital Signal
A digital signal is defined as the signal which has only a finite
number of distinct values. Digital signals are not continuous signals. In
the digital electronic calculator, the input is given with the help of
switches. This input is converted into electrical signal which have two
discrete values or levels. One of these may be called low level and
another is called high level. The signal will always be one of the two
levels. This type of signal is called digital signal. Examples of the digital
signal are following.
• Binary Signal=only two distinct values
• Octal Signal=only eight distinct values
• Hexadecimal Signal=only 16 distinct values
Comparison of Analog and Digital Signal
S.N. Analog Signal Digital Signal

1 Analog signal has infinite values. Digital signal has a finite number of values.

2 Analog signal has a continuous nature. Digital signal has a discrete nature.

3 Analog signal is generated by transducers and Digital signal is generated by A to D converter.


signal generators.

4 Example of analog signal − sine wave, triangular Example of digital signal − binary signal.
waves.
Logic Gates
Logic gates are the basic building blocks of any digital system. Logic
Gates act as switches in a circuit that performs logical operation. They
are basically used to perform logical operations by acting as a switch.It
is an electronic circuit having one or more than one input and only one
output. The relationship between the input and the output is based on
a certain logic. Based on this, logic gates are named as AND gate, OR
gate, NOT gate etc.
AND Gate(Multiplication)
The output of AND Gate is ‘High’ (True or 1) if both the inputs are High and the
output is ‘Low’ (False or 0) if both or either of the inputs is ‘Low’. AND Gates are
used to enable/inhibit the data transfer function. A circuit which
performs an AND operation is shown in figure.
                                                      
Truth Table

Logic diagram
                                      

                                   
AND Gate Example
OR Gate (Addition)
The output of OR Gate is ‘High’ (True or 1) if both the inputs are ‘High’
(True or 1) or one of the inputs is ‘High’(True or 1). The output is ‘Low’
(False or 0) if both the inputs are ‘Low’ (False or 0) . A circuit which
performs an OR operation is shown in figure. 

Logic diagram
                                     

Truth Table

                                  
OR Gate Example
Suppose in an industrial plant if one or more than one parameter exceeds
the safe value, some protective measure is needed to be done. In that case
OR gate is used. We are going to show this with the help of a diagram.

The figure is a typical schematic diagram where an OR gate is used to detect


exceed of temperature or pressure and produce command signal for the
system to take required actions.
NOT Gate (Inverter)
NOT gate is also known as Inverter because they invert the output
given to them and show the reverse result.

Logic diagram

Truth Table
Not Gate Example
NAND Gate
A NOT-AND operation is known as NAND operation. NAND Gates are
used in Burglar alarms and buzzers.

Logic diagram

Truth Table
NOR Gate
A NOT-OR operation is known as NOR operation. The output of NOR
Gate is ‘High’ if both the inputs are ‘Low’. The output is ‘Low’ if both
the inputs are ‘High’ or either of the input is ‘High’.

Logic diagram

Truth Table
Explanation of NOR Gate (Emergency
Light):
Microprocessor
• The key element of all computers, providing the mathematical and
decision making ability. Current state-of-the-art microprocessors
(Pentium, Athlon, SPARC, PowerPC) contain complex circuits consisting of
tens of millions of transistors. They operate at ultra-fast speeds – doing
over a billion operations every second. Made up from a semiconductor,
Silicon.
• A microprocessor is similar to our human brain, it can be trained to do
anything. It can be programmed to do anything we want based on it’s
instruction set and capabilities. Sometimes solutions are very complex,
circuits also becomes very complex if we try to solve it without
programming. Here is my analogy. Imagine you want to make a big
building. Usage of BRICKS will make the construction process simple and
cost effective. And it will also give you the freedom to make the building in
shape and size what you like. Instruction set in a microprocessor are the
bricks which you can use to solve your problem. By using those
instructions you can easily solve complex program.
How does a Microprocessor work ?
• Microprocessors are powerful pieces of hardware, but not much
useful on their own. The microprocessor follows a sequence: Fetch,
Decode, and then Execute.
• Initially, the instructions are stored in the memory in a sequential
order. The microprocessor fetches those instructions from the
memory, then decodes it and executes those instructions till STOP
instruction is reached. Later, it sends the result in binary to the output
port.
• A microcomputer is 1 example of a microprocessor system
Micro-controllers?
• Micro-controllers are another type of microprocessor systems. A microcontroller is a
compact integrated circuit designed to govern a specific operation in an embedded
system.
• A typical microcontroller  includes a processor, memory and input/output (I/O)
peripherals on a single chip. Microcontrollers are used in automatically controlled
products and devices, such as automobile engine control systems, implantable
medical devices, remote controls, office machines, appliances, power tools, toys and
other embedded systems.
• Microcontrollers (MCUs) play a significant role in a variety of portable medical
instrumentation products such as personal blood pressure monitors, spirometers,
pulse oximeters and heart rate monitors.
• In the office, microcontrollers are used in computer keyboards, monitors, printers,
copiers, fax machines, and telephone systems to name a few. In your home,
microcontrollers are used in microwave ovens, washers and dryers, security systems,
lawn sprinkler station controllers, and music/video entertainment components.
Memory Devices
A memory is just like a human brain. It is used to store data and instruction.
Computer memory is the storage space in computer where data is to be processed and
instructions required for processing are stored.
The memory is divided into large number of small parts. Each part is called a cell.
Each location or cell has a unique address which varies from zero to memory size minus
one.
For example if computer has 64k words, then this memory unit has 64 * 1024 =
65536 memory location. The address of these locations varies from 0 to 65535.
Memory is primarily of two types
• Internal Memory − cache memory and primary/main memory
• External Memory − magnetic disk / optical disk etc.
The Main Memory Bottleneck
• CPU bottleneck happens when the processor isn’t fast enough to
process and transfer data. Modern super-fast microprocessors can
process a huge amount of data in a short duration. They require
quick access to data to maximize their performance. If they don’t
receive the data that they require, they literally stop and wait – this
results in reduced performance and wasted power. Current
microprocessors can process an instruction in about a ns. Time
required for fetching data from main memory (RAM) is of the order
of 100 ns.
Solution to the Bottleneck Problem
• A great way to lower your CPU bottleneck issues is to close
your background processes.
• Make the main memory faster. In addition to the relatively
slow main memory, put a small amount of ultra-fast RAM
right next to the microprocessor on the same chip and make
sure that frequently used data and instructions resides in
that ultra-fast memory.
• Advantage: Much better overall performance due to fast
access to frequently-used data and instructions .
RAM
A RAM constitutes the internal memory of the CPU for storing data, program and program
result. It is read/write memory. It is called random access memory (RAM).
Since access time in RAM is independent of the address to the word that is, each storage
location inside the memory is as easy to reach as other location & takes the same amount of
time. We can reach into the memory at random & extremely fast but can also be quite
expensive.
RAM is volatile, i.e. data stored in it is lost when we switch off the computer or if there is a
power failure. Hence, a backup uninterruptible power system (UPS) is often used with
computers. RAM is small, both in terms of its physical size and in the amount of data it can
hold.
RAM is of two types:
• Static RAM (SRAM)
• Dynamic RAM (DRAM)
ROM
ROM stands for Read Only Memory. The memory from which we
can only read but cannot write on it. This type of memory is non-
volatile. The information is stored permanently in such memories
during manufacture.
A ROM, stores such instruction as are required to start computer
when electricity is first turned on, this operation is referred to as
bootstrap. ROM chip are not only used in the computer but also in
other electronic items like washing machine and microwave oven.
Cache Memory
Cache memory is a very high speed semiconductor memory which
can speed up CPU. It acts as a buffer between the CPU and main
memory. It is used to hold those parts of data and program which are
most frequently used by CPU. The parts of data and programs, are
transferred from disk to cache memory by operating system, from
where CPU can access them.
Advantages Disadvantages
• Cache memory is faster than main • Cache memory has limited capacity.
memory. • It is very expensive.
• It consumes less access time as
compared to main memory.
• It stores the program that can be
executed within a short period of
time.
• It stores data for temporary use.
Auxiliary Memory
Auxiliary memory is much larger in size than main memory but is slower. It normally stores
system programs, instruction and data files. It is also known as secondary memory. It can also be
used as an overflow/virtual memory in case the main memory capacity has been exceeded.
Secondary memories cannot be accessed directly by a processor. First the data/information of
auxiliary memory is transferred to the main memory and then that information can be accessed
by the CPU. Characteristics of Auxiliary Memory are following −
• Non-volatile memory − Data is not lost when power is cut off.
• Reusable − The data stays in the secondary storage on permanent basis until it is not overwritten
or deleted by the user.
• Reliable − Data in secondary storage is safe because of high physical stability of secondary
storage device.
• Convenience − With the help of a computer software, authorized people can locate and access
the data quickly.
• Capacity − Secondary storage can store large volumes of data in sets of multiple disks.
• Cost − It is much lesser expensive to store data on a tape or disk than primary memory.

You might also like