0% found this document useful (0 votes)
2 views

UNIT-1[1]

The document provides an overview of various types of computers, including personal computers, workstations, mainframes, servers, and supercomputers, along with their functionalities. It also explains the basic operational concepts of computers, including functional units like input, output, memory, arithmetic & logic units, and control units, as well as the role of system software and operating systems. Additionally, it discusses performance improvement techniques, basic input/output operations, and data structures such as stacks and queues.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

UNIT-1[1]

The document provides an overview of various types of computers, including personal computers, workstations, mainframes, servers, and supercomputers, along with their functionalities. It also explains the basic operational concepts of computers, including functional units like input, output, memory, arithmetic & logic units, and control units, as well as the role of system software and operating systems. Additionally, it discusses performance improvement techniques, basic input/output operations, and data structures such as stacks and queues.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 112

UNIT-1

Computer Types
• A computer is an electronic device that can store, manipulate, and process
data according to a set of instructions.
• The list of instruction is called Computer Program
• Many types of computers exist that differ widely in size, cost,
computational power and intended use
• Types
• Personal Computers
• Notebook Computers
• Workstations
• Enterprise Systems or mainframes and Servers
• Supercomputers
Computer Types
• Personal computers
• Personal Computers is also known as a microcomputer. It is basically a general-purpose
computer designed for individual use. It consists of a microprocessor as a central processing
unit(CPU), memory, input unit, and output unit. This kind of computer is suitable for personal
work such as making an assignment, watching a movie, or at the office for office work, etc.
• Notebook Computers
• These are compact version of the personal computer with all of the components packaged
into a single unit the size of the thin briefcase.
• Workstation
• It is a high-performance computer system that is basically designed for a single user and has
advanced graphics capabilities, large storage capacity, and a powerful central processing unit.
A workstation is more capable than a personal computer (PC) but is less advanced than a
server
Computer Types
• Enterprise systems or mainframe
• A mainframe is defined as a large, powerful computer typically used for complex
calculations and data processing tasks. It can connect to multiple end clients
simultaneously so that several users can access different applications and processes
running on the mainframe concurrently without impacting performance or security.
• Server
• A server is a computer or system that provides resources, data, services, or programs
to other computers, known as clients, over a network
• Supercomputer
• A supercomputer is defined as an extremely powerful computing device that
processes data at speeds measured in floating-point operations per second (FLOPS) to
perform complex calculations and simulations, usually in the field of research, artificial
intelligence, and big data computing.
Questions
• Write about applications of Super computer.
• List the top companies who manufacturer the Mainframes
• How many servers are installed in our dept and name the company of
server and give the details of server configuration
Functional Units
• A computer in its simplest form comprises five functional units
namely input unit, output unit memory unit, arithmetic & logic unit
and control unit.
Functional Units
• Input Unit:
• Computer accepts coded information through input unit. The standard input device is a keyboard.
Whenever a key is pressed, keyboard controller sends the code to CPU/Memory.
• Memory Unit:
• Memory unit stores the program instructions (Code), data and results of computations etc. Memory
unit is classified as:
• Primary /Main Memory
• Secondary /Auxiliary Memory
• Primary memory is fast memory that operates at electronic speeds
• The memory contains a large number of semiconductor storage cells,each capable o fstoring one bit of
information.
• The cells are rarely read or written as individual cells but instead are processed in groups of fixed size
called words.
• To provide access to any word in memory, a distinct address is associated with each word location.
• The number of bits in each word is often referred to as the word length of the computer
• Typical work length range from 16 to 64 bits.
• Memory in which any location can be reached in a short and fixed amount of time after specifying its
address is called Random Access memory.
• The time required to access one word is called memory access time.
• The time is fixed , independent of the location of the word being accessed.
• It typically ranges from a few nanoseconds to about 100 ns for modern RAM Units.
Functional Units
• Output Unit:
• Computer after computation returns the computed results, error messages,
etc. via output unit. The standard output device is a video monitor, LCD/TFT
monitor. Other output devices are printers,etc
• Control Unit:
• Control unit co-ordinates activities of all units by issuing control signals.
• Control signals issued by control unit govern the data transfers and then
appropriate operations take place.
• Control unit interprets or decides the operation/action to be performed.
Functional Units
• ALU
• Any arithmetic or logic operation is initiated by bringing the required
operands into the processor where the operation is performed by the ALU.
• When the operands are brought into the processor they are stored in high
speed storage elements are registers.
• Each register can store one word of data.
• Access times to register are some what faster than access times to the fastest
cache unit in the memory hierarchy
Functional Units
• Computer will handle the information for doing tasks.
• The information will be categorize into two types
• Instructions
• These will govern the transfer of information within a computer as well as between the computer
and its devices
• Specify the arithmetic and logic operations to be performed
• The processor fetches the instructions from memory one after another and performs the desired
operations.
• Data
• These are numbers and characters that are used as operands by the instructions.
• Information handled by a computer must be encoded in a suitable format.
• Most present day hardware employs digital circuits that have only two stable states ON and OFF.
• Each number, character and alpha numerics are encoded as a string of binary digits called bits
with possible values 1 or 0.
Basic Operational Concepts
• The activity of computer is governed by instructions
• To perform a task, an appropriate program consisting of a list of instructions is stored in
the memory.
• Individual instructions are brought from the memory into the processor, which executes
the specified operations
• Data to be used as operands are also stored in the memory
• Ex:Add LOCA, R0
• Add the operand at memory location LOCA to the operand in a register R0 in the
processor.
• Place the sum into register R0.
• The original contents of LOCA are preserved.
• The original contents of R0 is overwritten.
Basic Operational Concepts
• Ex:2
• Load LOCA, R1
• Add R1, R0
• Whose contents will be overwritten?
Basic Operational Concepts
Basic Operational Concepts
Basic Operational Concepts
Basic Operational Concepts
Bus Structures
Software
• In order for a user to enter and run an application program, the
computer must already contain some system software in its memory
• System software is a collection of programs that are executed as
needed to perform functions such as
• Receiving and interpreting user commands
• Running standard application programs such as word processors,
etc, or games
• Managing the storage and retrieval of files in secondary storage
devices
• Controlling I/O units to receive input information and produce
output results
Software

• Translating programs from source form prepared by the user into object form consisting
of machine instructions
• Linking and running user-written application programs with existing standard library
routines, such as numerical computation packages
• System software is thus responsible for the coordination of all activities in a computing
system
• Another important system program that all programmers use is a text editor.
• It is used fo entering and editing application programs.
• The user of this program interactively executes commands that allow statements of a
source program entered with the keyboard.
Operating System
• Operating system (OS)
• This is a large program, or actually a collection of routines, that is
used to control the sharing of and interaction among various
computer units as they perform application programs
• The OS routines perform the tasks required to assign
computer resource to individual application programs
• These tasks include assigning memory and magnetic disk space to
program and data files, moving data between memory and disk
units, and handling I/O operations
• In the following, a system with one processor, one disk, and
one printer is given to explain the basics of OS
• Assume that part of the program’s task involves reading a data file
from the disk into the memory, performing some computation on
the data, and printing the results
User Program and OS Routine Sharing
Performance

Clock rate is number of clock


cycles per second
Performance
Performance Improvement
• Pipelining and superscalar operation
• Pipelining: by overlapping the execution of successive
instructions
• Superscalar: different instructions are concurrently
executed with multiple instruction pipelines. This means
that multiple functional units are needed
• Clock rate improvement
• Improving the integrated-circuit technology makes logic
circuits faster, which reduces the time needed to complete a
basic step
Performance Improvement

• Reducing amount of processing done in one basic step also makes it possible to
reduce the clock period, P.
• Reduce the number of basic steps to execute
• Reduced instruction set computers (RISC) and complex instruction set
computers (CISC)
Performance
Numbers, Arithmetic, Operations
and characters
Numbers, Arithmetic, Operations and characters
Numbers, Arithmetic, Operations
and characters
Numbers, Arithmetic, Operations and characters
Numbers, Arithmetic, Operations
and characters
Numbers, Arithmetic, Operations
and characters
Instruction and Instruction
Sequencing
Instruction and Instruction
Sequencing
Instruction and Instruction
Sequencing
Instruction and Instruction
Sequencing
Instruction and Instruction
Sequencing
Instruction and Instruction
Sequencing
Instruction and Instruction
Sequencing
Instruction and Instruction
Sequencing
Instruction and Instruction
Sequencing
Instruction and Instruction
Sequencing
Instruction and Instruction Sequencing
Instruction and Instruction Sequencing
Instruction and Instruction
Sequencing

Info related to exec is mainted by CPU using these flags

These are grouped to form regis


N (negative)-set to 1 if result is –ve or else 0.
Z (zero)-set to 1 if result is 0, or else 0 .
V (overflow)-set to 1if arithmetic overflow occurs
or else 0.
C(carry)-set to 1 if carry out results from operation
or else 0
Addressing Modes
• In general a program operates on data that resides in the computer
memory.
• These data can be organized in variety of ways.
• Programs are normally written in High Level Language which enables the
programmers to used constants, local and global variables, pointers and
arrays.
• While translating high level program to assembly level,the compiler must
be able to implement these constructs using the facilities provided in the
instruction set of the computer.
• The different ways in which the location of an operand is specified in an
instruction are referred to as addressing modes.
Addressing Modes
Addressing Modes
Addressing Modes
Addressing Modes
Addressing Modes
Basic Input/Output Operations

• Input/Output operations which transfer data from the


processor or memory to and from the real world are
essential.
• In general, the rate of transfer from any input device to
the processor, or from the processor to any output
device is likely to the slower than the speed of a
processor.
• The difference in speed makes it necessary to create mechanisms to
synchronize the data transfer between them.
Basic Input/Output Operations

• Let us consider a simple task of reading a character from a keyboard


and displaying that character on a display screen.
• A simple way of performing the task is called program-controlled I/O.
• There are two separate blocks of instructions in the I/O program that
perform this task:
• One block of instructions transfers the character into the
processor.
• Another block of instructions causes the character to be
displayed.
Basic Input/Output
operations (cont.)
Bus

Processor
D AT AIN D A TA OUT

SIN SOUT

Ke yboard Display
Input:
•When a key is struck on the keyboard, an 8-bit character code is stored in the buffer
register DATAIN.
•A status control flag SIN is set to 1 to indicate that a valid character is in DATAIN.
•A program monitors SIN, and when SIN is set to 1, it reads the contents of DATAIN.
•When the character is transferred to the processor, SIN is automatically cleared.
•Initial state of SIN is 0.
64
Basic Input/Output
operations (cont.)
Bus

Processor
D AT AIN D A TA OUT

SIN SOUT

Ke yboard Display
Output:
•When SOUT is equal to 1, the display is ready to receive a character.
•A program monitors SOUT, and when SOUT is set to 1, the processor transfers a
character code to the buffer DATAOUT.
•Transfer of a character code to DATAOUT clears SOUT to 0.
•Initial state of SOUT is 1.

65
Accessing I/O devices (cont.)

•I/O device is connected to the bus using an I/O interface circuit which has:
Address decoder, control circuit, and data and status registers.
•Address decoder decodes the address placed on the address lines thus
enabling the device to recognize its address (each device has a unique
address).
•Data register (DATAIN and DATAOUT) holds the data being transferred to or
from the processor.
•Status register (SIN and SOUT) holds information necessary for the
operation of the I/O device.
•Data and status registers are connected to the data lines.
•control circuit receive and transmit the control signals through the control
line.
66
Accessing I/O devices (cont.)

Address lines
Bus Data lines
Control lines

Address Control Data and I/O


decoder circuits status registers int erface

Input devices

67
Accessing I/O devices (cont.)

Address lines
Bus Data lines
Control lines

Address Control Data and I/O


decoder circuits status registers int erface

Output devices

68
Basic input and output operations
Basic input and output operations
Stacks and queues
Stacks and queues
Stacks and queues
Stacks and queues
Stacks and queues
Stacks and queues
Stacks and queues
Stacks and queues
Stacks and queues
Stacks and queues
Stacks and queues
CMP SRC,DTN

DTN=DTN-SRC

For POP

ASSUME SP AS 2004 THEN


COMPARE 2000,2004
DTN=2004-2000
=4 ERROR

For PUSH

ASSUME SP AS 1496 THEN


COMPARE 1500,1496
DTN=1496-1500
=-4 ERROR
Stacks and Queues
• The data structure that is similar to the stack is called a queue.
• Data are stored in and retrieved from a queue on a first-in-first-out (FIFO) basis.
• Thus, if we assume that the queue grows in the direction of increasing addresses in
the memory, which is a common practice, new data are added at the back (high-
address end) and retrieved from the front (low-address end) of the queue
• There are two important differences between how a stack and a queue are
implemented.
• One end of the stack is fixed (the bottom), while the other end rises and falls as data
are pushed and popped. A single pointer is needed to point to the top of the stack at
any given time.
• On the other hand, both ends of a queue move to higher addresses as data are added
at the back and removed from the front.
• So two pointers are needed to keep track of the two ends of the queue.
Stacks and Queues
• Another difference between a stack and a queue is that, without further control, a
queue would continuously move through the memory of a computer in the direction
of higher addresses.
• One way to limit the queue to a fixed region in memory is to use a circular buffer.
• Let us assume that memory addresses from BEGINNING to END are assigned to the
queue.
• The first entry in the queue is entered into location BEGINNING, and successive
entries are appended to the queue by entering them at successively higher addresses.
• By the time the back of the queue reaches END, space will have been created at the
beginning if some items have been removed from the queue. Hence, the back pointer
is reset to the value BEGINNING and the process continues
Sub Routines
• In a given program, it is often necessary to perform a particular subtask many times on different data-values.
• Such a subtask is usually called a subroutine.
• For example, a subroutine may evaluate the sine function or sort a list of values into increasing or decreasing
order.
• After a subroutine has been executed, the calling program must resume execution, continuing immediately
after the instruction that called the subroutine.
• The subroutine is said to return to the program that called it by executing a Return instruction.
• The way in which a computer makes it possible to call and return from subroutines is referred to as its
subroutine linkage method.
• The simplest subroutine linkage method is to save the return address in a specific location, which may be a
register dedicated to this function.
• Such a register is called the link register.
• When the subroutine completes its task, the Return instruction returns to the calling program by branching
indirectly through the link register.
Sub Routines
• The Call instruction is just a special branch instruction that performs the
following operations
• Store the contents of the PC in the link register
• Branch to the target address specified by the instruction
• The Return instruction is a special branch instruction that performs the
operation
• Branch to the address contained in the link register.
Sub Routines
Sub Routines
• Subroutine Nesting and Processor Stack
• A common programming practice, called subroutine nesting, is to have one
subroutine call another
• In this case, the return address of the second call is also stored in the link register,
destroying its previous contents.
• Hence, it is essential to save the contents of the link register in some other location
before calling another subroutine.
• the last subroutine called completes its computations and returns to the subroutine
that called it.
Sub Routines

• Subroutine Nesting and Processor Stack


• This suggests that the return addresses associated with subroutine
calls should be pushed onto a stack.
• A particular register is designated as the stack pointer, SP, to be used
in this operation.
• The stack pointer points to a stack called the processor stack.
• The Call instruction pushes the contents of the PC onto the
processor stack and loads the subroutine address into the PC.
• The Return instruction pops the return address from the processor
stack into the PC.
Sub Routines
PARAMETER PASSING
• When calling a subroutine, a program must provide to the subroutine the
parameters, that is, the operands or their addresses, to be used in the
computation.
• Later, the subroutine returns other parameters, in this case, the results of the
computation.
• This exchange of information between a calling program and a subroutine is
referred to as parameter passing.
• Parameter passing may be accomplished in several ways.
• The parameters may be placed in registers or in memory locations, where they
can be accessed by the subroutine.
• Alternatively, the parameters may be placed on the processor stack used for
saving the return address.
Sub Routines
Parameter
Passing
Sub Routines
Parameter Passing
with stack
Additional Instructions
Additional Instructions
Additional Instructions
Additional Instructions
Additional Instructions
Additional Instructions
Additional Instructions
Design Half adder with Logic Gates
Step-1:Login into circuitverse.org with google

Step-2:Select XOR Gate from menu and drag into the dashboard

Step-3:Selelct And Gate from menu and drag into the dashboard

Step-4:Link the input and outputs from menu to the circuits in the dashboard

Step-5: Verify the output with below truth table.


Half Adder
Design of Half Subtractor using
Logic Gates
Step-1:Login into circuitverse.org with google

Step-2:Select XOR Gate from menu and drag into the dashboard

Step-3:Selelct Not Gate from menu and drag into the dashboard

Step-4:Selelct And Gate from menu and drag into the dashboard

Step-5:Link the two inputs and two outputs(one for diff and one for borrow) from menu to the circuits in the dashboard

Step-6: Verify the output with below truth table.


Half Subtractor
Design Full Adder with Logic Gates
Step-1:Login into circuitverse.org with google

Step-2:Select Two XOR Gates from menu and drag into the dashboard

Step-3:Selelct And Gates from menu and drag into the dashboard

Step-4:Selelct OR Gate from menu and drag into the dashboard

Step-5:Link the three inputs and two outputs(one for sum and one for carry) from menu to the circuits in the dashboard

Step-6: Verify the output with below truth table.


Design of Full Adder with logic gates
Design of Full Subtractor
Step-1:Login into circuitverse.org with google

Step-2:Select Two XOR Gates from menu and drag into the dashboard

Step-3:Selelct three And Gates from menu and drag into the dashboard

Step-4:Selelct OR Gate and Not gate from menu and drag into the dashboard

Step-5:Link the three inputs and two outputs(one for diff and one for borrow) from menu to the circuits in the dashboard

Step-6: Verify the output with below truth table.


Design of Full Subtractor

You might also like