ITB - Unit 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

INTRODUCTION TO COMPUTER:

A computer is a programmable machine. The two principal characteristics of a computer


are:

• It responds to a specific set of instructions in a well-defined manner.


• It can execute a prerecorded list of instruction (a program).

Modern computers are electronic and digital. The actual machinery - wires, transistors,
and circuits – is called hardware; the instructions and data are called software.

All general-purpose computers require the following hardware components:


➢ Central Processing Unit (CPU): The “heart” of the computer, the component that
actually executes instruction.
➢ Memory: Enables a computer to store, at least temporarily, data and programs.
➢ Input device: Usually a keyboard or mouse, the input device is the conduit through
which data and instructions enter a computer.
➢ Output device: A display screen, printer, or other such devices that lets you see what the
computer has accomplished.
➢ Mass storage device: Allows a computer to permanently retain large amounts of data.
Common mass storage devices include disk drives and tape drives.

In addition to these components, many others make it possible for the basic components
of a computer to work together efficiently.

Types of Computers
Computers can be classified by their size and power as follows:
• Personal computer: A small, single-user computer based on a microprocessor. In addition
to the microprocessor, a personal computer has a keyboard for entering data, a monitor for
displaying information, and a storage device for saving data.
• Workstation: A powerful, single-user computer. A workstation is like a personal
computer, but it has a more powerful microprocessor and a higher-quality monitor.
• Minicomputer: A multi-user computer capable of supporting 10 to hundred of users
simultaneously.
• Mainframe: A powerful multi-user computer capable of supporting many
hundreds ofusers simultaneously.
• Supercomputer: An extremely fast computer that can perform hundreds of
millions ofinstructions per second.

[‘/Characteristics of Computers:
All computers have certain common characteristics irrespective of their type and size.
Computers are not just adding machines; they are capable of doing complex activities and
operations. They can be programmed to do complex, tedious and monotonous tasks. Computes
are what they are because of the following characteristics.
Word Length:
A digital computer operates on binary digits – 0 and 1. It can understand information
onlyin terms of 0’s and 1’s. A binary digit is called a bit; a group of 8 bits is called a byte. The
number of bits that a computer can process at a time in parallel it called its word length.
Commonly used word lengths are 8, 16, 32, 64 bits. Word length is the measure of the
computing power of a computer.
Speed:
Computer can calculate at very high speeds. A microcomputer, for example, can execute
millions of instructions per second over and over again without any mistake. As the power of
the computer increase, the speed also increases.
Storage:
Computers have their main memory and auxiliary memory systems. A computer can
store a large amount of data. With more and more auxiliary storage devices, which are capable
of storing huge amounts of data, the storage capacity of a computer is virtually unlimited. The
factor that makes computer storage unique is not that it can store vast amount of data, but the
fact that it can retrieve the information that the user wants in a few seconds.
Accuracy:
The accuracy of a computer system is very high, Errors in hardware can occur, but error
detecting and correcting techniques will prevent false results. In most cases, the errors are
dueto the human factor rather than the technological flaws.
Versatility:
Computers are very versatile machines. They can perform activities ranging from simple
calculations to performing complex CAD modeling and simulation to navigating missiles and
satellites. In other words, they are capable of performing almost any task, provided the task
can be reduced to a series of logical steps. Computers can communicate with other computers
and cam receive and send data in various forms like text, sound, video, graphics, etc. This
computer to communicate to one another has led to the development of computer
networks,Internet, WWW and so on.
Automation:
The level of automation achieved in a computer is phenomenal. Once a task is initiated,
computers can proceed on its own till its completion. Computers can be programmed to
performa series of complex tasks involving multiple programs. Computers will perform these
things flawlessly.
They will execute the programs in the correct sequence, they will switch on/off the
machines at the appropriate time, they will monitor the operational parameters, and they will
send warning signals or take corrective actions if the parameters exceed the control level, and
soon. Computers are capable of these levels of automation, provided they are programmed
correctly.
Diligence:
Diligence means being constant and earnest in effort and application. Human beings
suffer from weakness like tiredness, lack of concentration, etc. Being a machine, a computer
does not have any of these human weaknesses.
They will not go into depression or lose concentration. They will perform the tasks that
are given to them, irrespective of whether it is interesting, creative, and monotonous or boring,
irrespective of whether it is the first time or the millionth time, with exactly the same accuracy
and speed.
CLASSIFICATION OF DIGITAL COMPUTER
Computer systems are classified as Microcomputers, Minicomputers, Mainframes and
Supercomputers.
Micro Computers:
The most familiar kind of computer is the microcomputer. In the past, microcomputers
have been considered to be of two types- Personal Computers and Workstations.
Personal Computers (PCs):
PCs were desktop or portable machines. These machines ran comparatively easy-to-use
applications software such as the word processors, spreadsheets, and etc. they were usually easier
to use and more affordable than workstations. However, they had less sophisticated video display
screens, operating systems and networking capabilities. Most important, they did not have the
processing power that workstations did. Examples of personal computers are Acer’s Aspire,
Compaq Presario, etc.

Workstations:
Workstations are, expensive, powerful machines used by engineers, scientists, and other
professionals who processed a lot of data. People who need to run complex programs and display
both work in progress and results graphically also use workstations. Workstations use
sophisticated display screens featuring high-resolution colour graphics and operating systems
such as UNIX that permitted multitasking workstations also use powerful networking links to
other computers. It has powerful processor, which could churn out results much faster than the
PCs. Example Sun, Apollo, Hewlett-Packard, NeXt and IBM.
Portable Computers:
Now, computers are becoming smaller yet more powerful. The portable computer, can be
easily carried around. There are three categories of portable computers: Laptops or Notebook
PCs, Sub notebooks and Personal Digital Assistants.
Laptops / Notebooks:
Laptops may be either AC-powered, battery-powered, or both. These computers are ideal
for users who have to work away from their offices. The uses of these computers might be an
executive on the move, a student, a journalist, a salesperson, etc. These computes combine the
power of the PC with mobility. An example is IBM ThinkPad.
Subnotebooks:
Subnotebooks are for frequent flyers and life-on-the-road professionals. Subnotebook users
give up a full display screen and keyboard in exchange for less weight. These computers fit easily
into any briefcase. They typically have an external floppy disk drive and monochrome monitor,
although of late colour models are available.
Personal Digital Assistant (PDAs):
PDAs are much smaller than the subnotebooks. They combine pen input, writing
recognition, personal organizational tools, and communication capabilities in a very small
package.
Typical users are executives, businessmen, etc. who use these machines for their day-to-
day activities – scheduling, organization, etc. an example of a PDA is Apple’s ipad.
Minicomputers:
Minicomputers are special purpose mainframe computers, they were used to control
machine in a manufacturing unit. However, now they are widely used as general-purpose
computes. Minicomputers work well in what are known as Distributed Data Processing g (DDP).
That is, a company’s processing power is decentralized, or distributed across different computers.
Mainframes:
Mainframe computers can process several million-program instructions per second, large
organizations rely on these room-size systems to handle large programs with lots of data.
Mainframes are mainly used by insurance companies, banks, airline and railway
reservation system, etc.

Supercomputers:
Supercomputers are the fastest calculation devices ever invented. A supercomputer can
operate at speeds measured in nanoseconds and even in picoseconds. These machines are for
applications requiring very large programs and huge amounts of data that must be processed
quickly. Examples of such task are weather forecasting, oil exploration, weapons research, and
large-scale simulation.
The chief difference between a supercomputer and a mainframe is that a supercomputer
channels all its power into executing a few programs as fast as possible, whereas as mainframe
uses its power to execute many programs concurrently. More powerful supercomputer thousands
of integrated microprocessors.
Network Computers:
Network computers are computers with minimal memory, disk storage and processor
power designed to connect to a network, especially the Internet. The idea behind network
computers is that many users who are connected to a network don’t need all the computer power
they get from a typical personal computer. Instead, they can rely on the power of the network
servers. Network computers minimizing the amount of memory and processor power required by
the workstation.

ANATOMY OF DIGITAL COMPUTER

A Computer is composed of 3 main components:


1. Input Unit
2. Central Processing unit
3. Output Unit

Input Unit:

In this unit devices are connected externally to entering data into the computer. It is
medium for making connection between user and interface. It transfer data, which is made by
human being and make them understandable form for computers. Examples of input devices:

Keyboard, mouse, scanner, card reader, OMR and OCR etc.

Central Processing Unit: It consist of three main parts

• Memory
• Arithmetic and logical unit
• Control Unit

Memory:

It is term, which is used in data storage, and also stored important information of data for
future use and also transfer to another device when needed. We can say that it is primary type of
storage or internal memory. Internal memory is executed through two types of memory
technology

• RAM (Random-access-memory): It gives direct information on requirement.


• ROM (Read-only-memory): By the name, it can read only not write, which means CPU
can read from storage but cannot write.

Arithmetic and logical unit:


Arithmetic means process like addition, subtraction, multiplication & division and all
these operation is done by Arithmetic unit. It solves any type of complex arithmetic operation.
And in Logical part, all type of logical operations like comparing, selecting, etc. It have few
storage for an example registers, and which are basically made-up of electronic circuits. Which
having capacity to perform operations like addition, subtraction, multiplication etc.

Control Unit:

It defines by controlling all operation of all parts of computer. It takes information from
memory and determines where is to be taken. It gives result in the output form in memory
section.

Computer Architecture

CPU AND MEMORY

➢ There are 2 basic type of memory:


(i) Random Access Memory (RAM) – In this a processor can read or write dataRAM is
used to store changing information’s like programs from disk etc. RAM can’t retain data
when power is turned off.
(ii) Read Only Memory (ROM) – Where the data in ROM can never change.ROM
retains data even when power in turned off
ROM is used to store booting program of a device.
➢ Each type of memory has number of cells (storage locations)
➢ Each cell has a unique address.
➢ Lowest address is 0 and highest varies with the type of memory.
➢ A cell is 8-bit (1 byte) wide, giving each byte a unique address.

Working principle

➢ With a memory there can be only 2 operations: Read or Write.


➢ Write has to be performed,
- Specify the address
- Perform read or write
➢ The computer places the address to operate on in the address bus, which is carried tomemory.
➢ Special circuitry determines which chip should satisfy the request and that chip isenabled.
➢ Processor also specifies weather it is a read or write operation.
➢ It is a read operation, and then memory copies the content of the location on to data bus.
➢ If it is a write operation the processor places the data in data bus, memory copies the datato a specified
location.
➢ This follows Von Neumann Architecture where data and instructions can be stored in thesame location.
➢ Processor knows whether it is addressing data or instructions.
➢ The CU accepts one instruction from data Bus and instructs the others components whatto do.
➢ ALU performs basic arithmetic operation like add, sub, multiply, divide.
➢ Register bank contains a set of memory cells; data could be read or written much quicklythan external
memory.
➢ Condition code register has a set of bits that indicates whether the result of the lastcommand
was “greater than zero”, “equal to zero”, or “less than zero”.

ROM RAM
06 00:

07 01:
02:
08 . .
.. . .
.. . .

Data Bus

Control Signal (Read/Write)


➢ Pc has the address of the next instruction to be executed.
Peripheral Devices

➢ Peripheral devices communicate with the outside world.


➢ It has 3 basic classes:
(i) Mass Storage Device
(ii) Input Devices
(iii) Output Devices
➢ Peripheral can be made to communicate with the computer through techniques such as
- Memory – Mapped I/O
- Using special I/O instruction
- Using separate I/O processors.

Memory – Mapped I/O:


➢ Each peripheral devices are assigned a address similarly like in memory
➢ To send data to monitor, processor places the address of monitor in address bus and thedata in data
bus.
➢ Processor controls the peripheral devices directly.
➢ This is a reliable way but time consuming, processor has to wait for the peripheral for
acknowledgement before going to next instruction

I/O Instruction:

➢ Special I/O instructions are used to instruct the processor that data has to becommunicated to IO.
➢ There can be a spate address and Data bus for the I/O devices.

I/O Processor:-

➢ The most efficient way to connect to peripheral devices without tying up processortime.
➢ I/O processors are separate devices.
➢ Processor stores the data to be sent to a peripheral in separate places.
➢ Then it instructs the I/O processor to take care of the data

Memory Cache:-

➢ Memory cache is a block of fast RAM placed between processor and slower memory
➢ Processor issues the I/O command and instructs the cache to hold data until thetransaction is finished
so that µp can go to next instruction.

MEMORY UNITS

➢ Memory units are the internal storage areas in a computer.


➢ Storage devices represent memory that exists on taps or disks (i.e. External Storage).
➢ Definition: Memory is an array of boxes, each of which can hold a single byte ofinformation.
➢ There are different types of memory mainly RAM and ROM

RAM

➢ Random Access Memory


➢ This refers to Read & write memory
➢ Is a volatile memory, meaning, it needs a constant power supply to maintain its contents
➢ Allows random access of data
Memory

RAM ROM

SRAM DRAM

ROM PROM EPROM Flash


EEPROM
Memory

Classification of
Memory

SECONDARY STORAGE DEVICES

➢ Auxiliary storage or secondary storage is the memory that supplements the main
storage.
➢ They are non-volatile memory.
➢ Unlike RAM or ROM, these memory devices are Read-Write memory and can
store datasemi permanently.
➢ They are useful to transfer data from one computer to another.
➢ They can also function as backup devices.
➢ There are 2 types of auxiliary storage devices based on type of data access.
i) Sequential Access Media
ii) Random Access Media
➢ In sequential access media, the data can be read in sequence and to get to a
particularpoint, you have to go through all the preceding points.
E.g.: Magnetic Tape
➢ In random access (direct access), a disk drive can access any point at random
withouthaving to pass through the preceding points.
E.g.: CD, DVD, etc.
➢ Various storage devices are:
Magnetic Tape, Winchester Disk, Hard Disk, Floppy Disk, Zip Disk, Jaz Disk, Super
Disk, Optical Disk, CD-ROM, CD-R, CD-RW, Mo Drive, DVD, Blue Ray Disk,
Pen Drive,SD Card, etc.
Note: Number System and Compliments were discussed and done in
class…Refer class notes
Truth Tables

Truth tables are used to help show the function of a logic gate. If you are unsure
about truth tables and need guidance on how go about drawing them for individual
gates or logic circuits then use the truth table section link.

Logic gates

Digital systems are said to be constructed by using logic gates. These gates are the
AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates. The basic operations are
described below with the aid of truth tables.

AND gate

The AND gate is an electronic circuit that gives a high output (1) only
if all its inputs are high. A dot (.) is used to show the AND operation
i.e. A.B. Bear in mind that this dot is sometimes omitted i.e. AB

OR gate

The OR gate is an electronic circuit that gives a high output (1) if one
or more of its inputs are high. A plus (+) is used to show the OR
operation.

NOT gate
The NOT gate is an electronic circuit that produces an inverted version of the
input at its output. It is also known as an inverter. If the input variable is A,
the inverted output is known as NOT A. This is also shown as A', or A with
a bar over the top, as shown at the outputs. The diagrams below show two
ways that the NAND logic gate can be configured to produce a NOT gate. It
can also be done using NOR logic gates in the same way.

NAND gate

This is a NOT-AND gate which is equal to an AND gate followed by


a NOT gate. The outputs of all NAND gates are high if any of the
inputs are low. The symbol is an AND gate with a small circle on the
output. The small circle represents inversion.

NOR gate

This is a NOT-OR gate which is equal to an OR gate followed by a


NOT gate. The outputs of all NOR gates are low if any of the inputs
are high.
The symbol is an OR gate with a small circle on the output. The small
circle represents inversion.

EXOR gate
The 'Exclusive-OR' gate is a circuit which will give a high output
if either, but not both, of its two inputs are high. An encircled plus
sign ( ) is used to show the EOR operation.

EXNOR gate

The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give a
low output if either, but not both, of its two inputs are high. The symbol is an
EXOR gate with a small circle on the output. The small circle represents inversion.

The NAND and NOR gates are called universal functions since with either one the
AND and OR functions and NOT can be generated.

Note:

A function in sum of products form can be implemented using NAND gates by


replacing all AND and OR gates by NAND gates.

A function in product of sums form can be implemented using NOR gates by


replacing all AND and OR gates by NOR gates.
Table 1: Logic gate symbols

Table 2 is a summary truth table of the input/output combinations for the NOT gate
together with all possible input/output combinations for the other gate functions.
Also note that a truth table with 'n' inputs has 2n rows. You can compare the outputs
of different gates.

Table 2: Logic gates representation using the Truth table

BOOLEAN ALGEBRA

• Boolean algebra is a branch of mathematics that deals with operations


on logical values with binary variables.
• The Boolean variables are represented as binary numbers to
represent truths: 1 = true and 0 = false.
• Elementary algebra deals with numerical operations whereas Boolean
algebra deals with logical operations.
• The primary modern use of Boolean algebra is in computer
programming languages.
• In finance, Boolean algebra is used in binomial options pricing models,
which helps determine when an option should be exercised.

Boolean Algebra in Finance

Boolean algebra has applications in finance through mathematical


modelling of market activities. For example, research into the pricing
of stock options can be aided by the use of a binary tree to represent the
range of possible outcomes in the underlying security. In this binomial
options pricing model, where there are only two possible outcomes, the
Boolean variable represents an increase or a decrease in the price of the
security.

Basic Laws of Boolean Algebra


In all the cases given below A can either be 0 or 1
1. A . 0 = 0
2. A . 1 = A
3. A . A = A
4. A . Ā = 0
5. A + 0 = A
6. A + 1 = 1
7. A + Ā = 1
8. A + A = A
Some basic Boolean algebra laws that are used to simplify Boolean expressions are:
1. Idempotent Law
A*A=A
A+A=A
2. Associative Law
(A * B) * C = A * (B * C)
(A + B) + C = A + (B + C)
3. Commutative Law
A*B=B*A
A+B=B+A
4. Distributive Law
A * (B + C) = A * B + A * C
A + (B * C) = (A + B) * (A + C)
5. Identity Law
A*0=0 A*1=A
A+1=1 A+0=A
6. Complement Law
A * ~A = 0
A + ~A = 1
7. Involution Law
~(~A) = A
8. DeMorgan’s Law
~(A * B) = ~A + ~B
~(A + B) = ~A * ~B
9. Absorption
A + (A * B) = A
A * (A + B) = A
(A * B) + (A * ~B) = A
(A + B) * (A + ~B) = A
A + (~A * B) = A + B
A * (~A + B) = A * B

Table Simplification of Boolean Function

Using the theorems of Boolean Algebra, the algebraic forms of functions can
often be simplified, which leads to simpler (and cheaper) implementations.

Example 1

F = A.B + A.B + B.C

= A. (B + B) + B.C

= A.1 + B.C

= A + B.C

Example 2

F = A.B.C + A.B.C + A.B.C + A.B.C

= A.B.C + A.B.C + A.B.C + A.B.C + A.B.C + A.B.C

= (A.B.C + A.B.C) + (A.B.C + A.B.C) + (A.B.C + A.B.C)

= (A + A). B.C + (B + B). C.A + (C + C). A.B

= B.C + C.A + A.B

Example 3 Show that A + A.B = A

A + AB

= A.1 + A.B
= A. (1 + B)

= A. 1

=A

KARNAUGH MAPS or K-MAPS

Refer the site

https://www.gatevidyalay.com/tag/karnaugh-map-pdf-notes/

You might also like