COA Summer

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 19

Chapter 1

Computer System

Introduction
A computer system is a system which is subdivided into two functional
entities: hardware and software. The hardware of the computer consists of
all the electronic components and electromechanical devices that comprise
the physical entity of the device. Computer software consists of the
instructions and data that the computer manipulates to perform various data-
processing tasks. A sequence of instructions for the computer is called a
program. The data that are manipulated by the program constitute the data
base.

A computer system is composed of its hardware and the system software


available for its use. The system software of a computer consists of a
collection of programs whose purpose is to make more effective use of the
computer. The programs included in a systems software package are referred
to as the operating system. They are distinguished from application programs
written by the user for the purpose of solving particular problems. For
example, a high-level language program written by a user to solve particular
data-processing needs is an application program, but the compiler that
translates the high-level language program to machine language is a system
program. The system software is an indispensable part of a total computer
system. Its function is to compensate for the differences that exist between
user needs and the capability of the hardware.

The hardware of the computer is usually divided into three major parts:
 Central processing unit contains an arithmetic and logic unit for
manipulating data, a number of registers for storing data, and control
circuits for fetching and executing instructions.
 Memory of a computer contains storage for instructions and data. It is
called a random access memory (RAM) because the CPU can access any
location in memory at random and retrieve the binary information
within a fixed interval of time.
 Input and output processor contains electronic circuits for
communicating and controlling the transfer of information between the
computer and the outside world. The input and output devices
connected to the computer include keyboards, printers, terminals,
magnetic disk drives, and other communication devices

Figure 1.1 block diagram of digital computer

Digital Computers
Digital computer is a digital system that performs various computational
tasks. The word digital implies that the information in the computer is
represented by variables that take a limited number of discrete values. Digital
computers use the binary number system, which has two digits: 0 and 1.
Information is represented in digital computers in groups of bits. By using
various coding techniques, groups of bits can be made to represent not only
binary numbers but also other discrete symbols, such as decimal digits or
letters of the alphabet.
Computer organization
Computer organization is concerned with the way the hardware components
operate and the way they are connected together to form the computer
system.
Computer architecture
Computer architecture is concerned with the structure and behavior of the
computer as seen by the user. It includes the information formats, the
instruction set, and techniques for addressing memory.
Logic Gates
Binary information is represented in digital computers by physical quantities
called signals. Electrical signals such as voltages exist throughout the
computer in either one of two recognizable states. The two states represent a
binary variable that can be equal to 1 or 0.
The manipulation of binary information is done by logic circuits called gates.
Gates are blocks of hardware that produce signals of binary 1 or 0 when input
logic requirements are satisfied. A variety of logic gates are commonly used in
digital computer systems. Each gate has a distinct graphic symbol and its
operation can be described by means of an algebraic expression. The input-
output relationship of the binary variables for each gate can be represented in
tabular form by a truth table.

Basic digital-logic element used in building electronic circuits. The six basic
types of gates are named in Boolean notation as OR gate, AND gate, NOT gate,
NOR (NOT OR) gate, and NAND (NOT AND) gate, XOR (exclusive OR) gate all of
which are used in directing (switching) current flow. Except the NOT gate,
each gate accepts more than one binary input, and output is a function of the
input(s), Also called logic circuit.

AND

Suppose you go to a nightclub where the doorman's job is to enforce a simple


rule: "Everyone in your group must wear a tie to come in". You go along with a
friend one night. If you're both wearing ties, you'll get in. If only one of you is
wearing a tie, or if neither of you is, neither of you will get in. An AND logic
gate works the same way with two electrical inputs. If both inputs are
switched on (that is, carry a number 1), the output will be 1 as well. Otherwise
the output will be 0. In electronics, we can represent an AND gate with this
little symbol. Three ways in which the gate can work are shown below
Boolean expression for AND gate is Y=A.B

Truth table for AND gate (Output only with all inputs)

Input 1 Input 2 Output

0 0 0

0 1 0

1 0 0
1 1 1

OR

You're not wearing a tie, so you go to another club further down the street.
Here, the person on the door is enforcing a different rule: "A group of people
can come in if any one of them is a member". If either you or your friend is a
member, or if you both are members, you can both come in. If neither of you is
a member, you're both left out in the cold. An OR logic gate works this way
with two electrical inputs. If either input is switched on (that is, carries a
number 1), the output will be 1 as well. Otherwise the output will be 0. In
electronics, we represent an OR gate with a different symbol. Three ways in
which it can work are shown beneath:

Boolean expression for OR gate is Y=A+B

Truth table for OR gate (Any input produces an output)

Input 1 Input 2 Output


0 0 0

0 1 1

1 0 1

1 1 1

NOT

So far, you've failed to get into either of the clubs. But there's one last hope:
you know a friend is having a party a few streets away. The only trouble is,
there's a really argumentative and contrary person on the door. He talks to
each person in turn as they approach him. If you're nice and polite, he shouts
abuse at you and turns you away. But if you're rude to him, he likes that for
some reason and lets you in. In other words, he does exactly the opposite of
what you'd expect! In electronics, there's a logic gate that works in the same,
contrary way and it's called a NOT gate or inverter. Unlike AND and OR gates,
it has only one input and one output. The output is exactly the opposite of the
input, so if the input is a 0, the output is 1 and vice versa. Here's how we
represent a NOT in electronics. Two ways it can work are shown beneath.
Boolean expression for NOT gate is Y=A‾

Truth table for NOT gate (Inverter)

Input Output

0 1

1 0

The other three common logic gates are variations on these three. XOR
(Exclusive OR) is like an OR, but it switches off if both the inputs are switched
on. NAND is just like AND, only the end result is swapped over (so where AND
produces an output of 1, NAND produces an output of 0). NOR is like OR with
the end result swapped over in the same way.
XOR (Exclusive OR)

The output of an XOR gate is high (1) only when exactly one of its inputs is
high (1). If both of an XOR gate's inputs are, low (0), or if both of its inputs are
high (1), then the output of the XOR gate is low. For Ex-OR gate, the output Y is
true if EITHER input A or if input B is true

Boolean expression for XOR gate is Y  A B

XOR truth table is as follows

Input Input
Output
1 2

NAND (NOT AND)


0 0 0
NAND is a combination of AND gate and
NOT gate, i.e., AND gate +NOT gate = NAND
gate. The NAND gate works opposite to the
0 1 1
AND gate. For a NAND gate, the output Y is
NOT true if BOTH input A and input B are
true. Boolean expression for NAND gate
1 0 1 is

1 1 0
NAND truth table is as follows

Input Input
Output
1 2

0 0 1

0 1 1

1 0 1

1 1 0

NOR (OR with outputs reversed)

NOR is a combination of OR gate and NOT gate, i.e., OR gate +NOT gate = NOR
gate. The NOR gate works opposite to the OR gate. For NOR gate, the
output Y is true if BOTH input A and input B are NOT true.
NOR truth table is as follows

Input 1 Input 2 Output

0 0 1

0 1 0

1 0 0

1 1 0

Integrated circuit

IC sometimes called a chip, microchip or microelectronic circuit, is


a semiconductor wafer on which thousands or millions of
tiny resistors, capacitors, diodes and transistors are fabricated. An IC can
function as an amplifier, oscillator, timer, counter, logic gate,
computer memory, microcontroller or microprocessor. A circuit in which all
or some of the circuit elements are inseparably associated and electrically
interconnected so that it is considered to be indivisible for the purposes of
construction and commerce. As the name suggests, it's an integrated system of
multiple miniaturized and interconnected components embedded into a thin
substrate of semiconductor material (usually silicon crystal). One common
example of a modern-day IC is the computer processor, which typically
contains millions or billions of transistors, capacitors, logic gates, etc.,
connected together to form a complex digital circuit. Although the processor is
an IC, not all ICs are processors.

Half adder and Full adder


An Adder is a device that can add two binary digits. It is a type of digital
circuit that performs the operation of additions of two numbers. It is mainly
designed for the addition of binary number, but they can be used in various
other applications like binary code decimal, address decoding, table index
calculation, etc. There are two types of Adder. One is Half Adder, and another
one is known as Full Adder.

 Half Adder
There are two inputs and two outputs in a Half Adder. Inputs are named as A
and B, and the outputs are named as Sum (S) and Carry (C). The Sum is X-OR
of the input A and B. Carry is AND of the input A and B. With the help of half
adder, one can design a circuit that is capable of performing simple addition
with the help of logic gates. Let us first take a look at the addition of single
bits.

0+0=0

0+1=1

1+0=1

1 + 1 = 10
These are the least possible single bit combinations. But the result for 1 + 1
=10. This problem can be solved with the help of an EX – OR gate. The sum
results can be re-written as a 2-bit output. Thus the above combination can be
written as

0 + 0 = 00

0 + 1 = 01

1 + 0 = 01

1 + 1 = 10

Here the output “1” of “10” becomes the carry-out. SUM is the normal output
and the CARRY is the carry-out.

SUM = A XOR B = A ⊕ B
CARRY = A AND B = A.B
The truth table of the half adder is shown below.

Inputs Outputs

A B Sum Carry

0 0 0 0

0 1 1 0

1 0 1 0
Inputs Outputs

1 1 0 1

The Half Adder Circuit is shown below.

The main disadvantage of this circuit is that it can only add two inputs and if
there is any carry it is neglected. Thus, the process is incomplete. To overcome
this difficulty Full Adder is designed. While performing complex addition,
there may be cases when you have to add two 8 bit bytes together. This can be
done with the help of Full Adder.

 Full Adder
The full adder is a little more difficult to implement than a half adder. The
main difference between a half adder and a full adder is that the full adder has
three inputs and two outputs. The two inputs are A and B, and the third input
is a carry input CIN. The output carry is designated as C OUT, and the normal
output is designated as S.

The truth table of the Full Adder Circuit is shown below.

The function will be


S=A⊕B ⊕C

Cout=(A.B)+(Cin.( A⊕B))

Inputs Outputs

A B CIN COUT S

0 0 0 0 0

0 0 1 0 1

0 1 0 0 1

0 1 1 1 0

1 0 0 0 1

1 0 1 1 0

1 1 0 1 0

1 1 1 1 1
The output S is an EX – OR between the inputs A and the half adder SUM
output B. The COUT will be true only if any of the two inputs out of the three are
HIGH or at logic 1.

Thus, a full adder circuit can be implemented with the help of two half adder
circuits. The first half adder circuit will be used to add A and B to produce a
partial sum. The second half adder logic can be used to add C IN to the sum
produced by the first half adder circuit. Finally, the output S is obtained.

If any of the half adder logic produces a carry, there will be an output carry.
Thus, COUT will be an OR function of the half adder CARRY outputs.

The Full adder circuit diagram shown below.

With the help of this type of symbol, one can add two bits together, taking a
carry from the next lower order of magnitude and sending a carry to the next
higher order of magnitude. In a computer, for a multi-bit operation, each bit
must be represented by a full adder and must be added simultaneously. Thus,
to add two 8 bit numbers, 8 full address is needed that can be formed by
cascading two of the 4-bit blocks.

Multiplexer and De-multiplexer


Multiplexer
A multiplexer (MUX) is a device allowing one or more low-speed analog or
digital input signals to be selected, combined and transmitted at a higher
speed on a single shared medium or within a single shared device.
Thus, several signals may share a single device or transmission conductor
such as a copper wire or fiber optic cable. A MUX functions as a multiple-input,
single-output switch.
The main function of the multiplexer is that it combines input signals, allows
data compression, and shares a single transmission channel.
Multiplexer is a device that has multiple inputs and a single line output. The
select lines determine which input is connected to the output, and also to
increase the amount of data that can be sent over a network within certain
time. It is also called a data selector.

Multiplexer

Multiplexers are classified into four types:

 2-1 multiplexer ( 1select line)


 4-1 multiplexer (2 select lines)
 8-1 multiplexer(3 select lines)
 16-1 multiplexer (4 select lines)

Two major forms of multiplexing are


Time Division Multiplexing (TDM) and Frequency Division
Multiplexing (FDM).
 TDM: is whereby the channel regulates the senders such that only one
sender can send a message at any one time using the networks full
capacity/ bandwidth. After some time interval, the next sender can
send, and this process repeats for all senders.
Therefore in our analogy, the Sender A has one hour to send letters, and
the postal service personnel will use their full resources to deliver the
letters to their respective recipients.
 FDM: all senders can use the network bandwidth the whole time, but
will be limited because there are multiple users at the same time and
therefore delivery could take a little longer. Back to our analogy, Sender
A sends a letter but the post office has other letters as well from other
senders, therefore the delivery will take longer.
Applications of Multiplexers
Multiplexers are used in various applications wherein multiple-data need to
be transmitted by using single line.

 Communication System
A communication system has both a communication network and a
transmission system. By using a multiplexer, the efficiency of the
communication system can be increased by allowing the transmission of
data, such as audio and video data from different channels through single
lines or cables.
 Computer Memory
Multiplexers are used in computer memory to maintain a huge amount of
memory in the computers, and also to reduce the number of copper lines
required to connect the memory to other parts of the computer.
 Telephone Network
In telephone networks, multiple audio signals are integrated on a single
line of transmission with the help of a multiplexer.
 Transmission from the Computer System of a Satellite – Multiplexer
can be used for the transmission of data signals from the computer
system of a satellite or spacecraft to the ground system using the GPS
(Global Positioning System) satellites.

De-multiplexer
De-multiplexer is also a device with one input and multiple output lines. It is
used to send a signal to one of the many devices. The main difference between
a multiplexer and a de-multiplexer is that a multiplexer takes two or more
signals and encodes them on a wire, whereas a de-multiplexer does reverse to
what the multiplexer does.

The De-multiplexer is also called as data distributors as it requires one input,


3 selected lines and 8 outputs. De-multiplexer takes one single input data line,
and then switches it to any one of the output line.

De-multiplexer

Application of DE multiplexer

De multiplexers are used to connect a single source to multiple destinations.


These applications include the following:

 Communication System
Mux and demux both are used in communication system to carry out the
process of data transmission. A De-multiplexer receives the output
signals from the multiplexer and at the receiver end it converts them back
to the original form.
 Arithmetic Logic Unit
The output of the ALU is fed as an input to the De-multiplexer, and the
output of the demultiplexer is connected to a multiple register. The
output of the ALU can be stored in multiple registers.
Program counter
A program counter is a register in the CPU that contains the address of the
next instruction to be executed from memory. For example, when your
computer is turned on, a signal places the decimal number F000 into the CPU;
telling the computer to look at the first instruction on the mother boards flash
memory chip.
A program counter is a register in a computer processor that contains the
address (location) of the instruction being executed at the current time. As
each instruction gets fetched, the program counter increases its stored value
by 1. After each instruction is fetched, the program counter points to the next
instruction in the sequence. When the computer restarts or is reset, the
program counter normally reverts to 0.

You might also like