Cao U1

You might also like

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

UNIT 1

Functional units of computer

o Functional units of a computer system are parts of the CPU (Central Processing Unit) that
performs the operations and calculations called for by the computer program. A computer
consists of five main components namely, Input unit, Central Processing Unit, Memory unit
Arithmetic & logical unit, Control unit and an Output unit.

Input unit:

o Input units are used by the computer to read the data. The most commonly used input devices
are keyboards, mouse, joysticks, trackballs, microphones, etc.
o However, the most well-known input device is a keyboard. Whenever a key is pressed, the
corresponding letter or digit is automatically translated into its corresponding binary code and
transmitted over a cable to either the memory or the processor.
o The most common example of an input device is a keyboard, Joystick, trackball, mouse, scanner
etc.

Output Unit:

o The primary function of the output unit is to send the processed results to the user. Output
devices display information in a way that the user can understand.
o Output devices are pieces of equipment that are used to generate information or any other
response processed by the computer. These devices display information that has been held or
generated within a computer.
o The most common example of an output device is a monitor, Printer and speakers etc.
Memory unit

o The Memory unit can be referred to as the storage area in which programs are kept which are
running, and that contains data needed by the running programs.
o The Memory unit can be categorized in two ways namely, primary memory and secondary
memory.
o Primary storage is the fastest memory that operates at electronic speeds. Primary memory
contains a large number of semiconductor storage cells, capable of storing a bit of information.
The word length of a computer is between 16-64 bits.
o It is also known as the volatile form of memory, means when the computer is shut down, anything
contained in RAM is lost.
o ROM is non-volatile memory that permanently stores instructions for your computer.
o The most common examples of primary memory are RAM and ROM.

Arithmetic & logical unit

o Most of all the arithmetic and logical operations of a computer are executed in the ALU
(Arithmetic and Logical Unit) of the processor. It performs arithmetic operations like addition,
subtraction, multiplication, division and also the logical operations like AND, OR, NOT
operations.

Control unit

o The control unit is a component of a computer's central processing unit that coordinates the
operation of the processor. It tells the computer's memory, arithmetic/logic unit and input and
output devices how to respond to a program's instructions.
o The control unit is also known as the nerve center of a computer system.
What is operand

In this instruction, "ADD" is the operation code (opcode), and "R1," "R2," and "R3" are operands. This
instruction instructs the CPU to add the values in registers R2 and R3 and store the result in register R1.

Basic Computer Terminologies

Computers are an integral part of every part of human life. A computer in itself is a wide term. It includes
various concepts, terms, and terminologies. It is very essential to understand each and every component
of a computer and its terminologies to understand a computer as a whole. we will look at the most
basic computer terminology.

• RAM, ROM, and Secondary Memory


• Register Memory
• Stored Program Concept
• ALU and CU
• I/O Devices
• Information (Data /Instructions) Encoding
• Loading and Saving
Some example of basic computer terminologies:
Bus Structures:

The bus is a group of conducting path which are used as transfer voltage or signal from one functional
unit to other fictional unit is called as bus.

Lines--Carry data
--- Address
---control purpose
Types of Bus structure:

1. Address bus
2. Data bus
3. Control bus
1. Address Bus:

1. Address bus carry the memory address while reading from writing into memory.
2. Address bus carry I/O post address or device address from I/O port.
3. In uni-directional address bus only the CPU could send address and other units could not
address the microprocessor.
4. Now a days computer is having bi-directional address bus.
2. Data Bus:

1. Data bus carry the data.


2. Data bus is a bidirectional bus.
3. Data bus fetch the instructions from memory.
4. Data bus used to store the result of an instruction into memory.
5. Data bus carry commands to an I/O device controller or port.
6. Data bus carry data from a device controller or port.
7. Data bus issue data to a device controller or port.
3. Control Bus:

Different types of control signals are used in a bus:

1. Memory Read: This signal, is issued by the CPU or DMA controller when performing a read
operation with the memory.
2. Memory Write: This signal is issued by the CPU or DMA controller when performing a write
operation with the memory.
3. I/O Read: This signal is issued by the CPU when it is reading from an input port.
4. I/O Write: This signal is issued by the CPU when writing into an output port.
5. Ready: The ready is an input signal to the CPU generated in order to synchronize the show
memory or I/O ports with the fast CPU.
A system bus is a single computer bus that connects the major components of a computer system,
combining the functions of a data bus to carry information, an address bus to determine where it should
be sent, and a control bus to determine its operation.
Software:

Software refers to a set of programs, instructions, and data that enable a computer or electronic device
to perform specific tasks, solve problems, or provide functionality. In essence, software is the intangible
component of a computer system that governs its behaviour and allows users to interact with the
hardware to accomplish various tasks.

There are two primary categories of software: application software and system software.

1. Application Software: Application software, often simply called "applications" or "apps," is


designed to perform specific tasks or functions for end-users. It is created to address particular
user needs and is tailored to various domains and industries. Application software can be further
categorized into several types, such as:
 Word Processing Software: Examples include Microsoft Word and Google Docs, used for
creating and editing documents.
 Spreadsheet Software: Examples include Microsoft Excel and Google Sheets, used for
numerical and data analysis tasks.
 Graphics and Multimedia Software: Examples include Adobe Photoshop for image
editing and Adobe Premiere Pro for video editing.
 Web Browsers: Software like Google Chrome, Mozilla Firefox, and Microsoft Edge allows
users to browse the internet.
 Gaming Software: Video games and gaming applications designed for entertainment.
 Business and Productivity Software: Includes tools like Microsoft Office, project
management software, and accounting software.
 Communication Software: Includes email clients, messaging apps, and video
conferencing tools.
Application software is what users interact with directly to perform their tasks and achieve their goals on
a computer or device.

2. System Software: System software, on the other hand, is responsible for managing and
controlling the computer hardware and providing a platform for application software to run. It
acts as an intermediary between the hardware and the user. Key components of system software
include:
 Operating Systems (OS): The OS is the core system software that manages hardware
resources, provides a user interface, and enables the execution of application programs.
Examples include Windows, macOS, Linux, iOS, and Android.
 Device Drivers: These are specialized software components that allow the operating
system to communicate with and control hardware devices like printers, graphics cards,
and network adapters.
 Utilities: System utilities perform various tasks, such as disk maintenance, security
management, and system optimization. Examples include antivirus software, disk cleanup
tools, and backup software.
System software plays a crucial role in ensuring the proper functioning of the computer system,
managing its resources, and providing a stable environment for running application software.
Difference between Application and System software

Aspect Application Software System Software


Purpose Designed for specific user tasks and Manages and supports computer hardware
functions. and provides a platform for applications.

User Interacted with directly by end-users. Runs in the background; users interact with it
Interaction indirectly through applications.

Examples Word processors, games, web Operating systems, device drivers, utilities, etc.
browsers, etc.

Customization Tailored to specific user needs and Standardized and generic to support various
domains. hardware and software.

Dependency Depends on system software to Provides a foundation for application software


function. to run.

Installation Installed separately by users. Pre-installed with the operating system or


hardware.
Updates and Updated independently by Typically updated by OS and hardware
Maintenance application developers. manufacturers.

User Interface Provides a user-friendly interface for Manages the overall user interface, including
specific tasks. the desktop environment.

Resource Uses system resources as needed. Manages and allocates system resources to
Management applications.

Accessibility Fulfils specific user requirements and Ensures overall system stability and
goals. functionality.

Examples Microsoft Word, Adobe Photoshop, Windows, macOS, Linux, device drivers,
Google Chrome, etc. antivirus software, etc.
Cache memory, often referred to simply as "cache," is a type of high-speed volatile computer memory that provides high-
speed data access to a processor and stores frequently used computer programs, applications, and data. It is a crucial
component of modern computer architectures and plays a key role in improving a computer's overall performance.

Cache memory is designed to bridge the speed gap between the central processing unit (CPU) and the computer's main
memory (RAM). While RAM provides large storage capacity but with relatively slower access times compared to the CPU,
cache memory is much smaller in size but extremely fast. It stores frequently accessed data and instructions from the main
memory so that the CPU can retrieve them quickly, reducing the need to access the slower RAM.

There are typically three levels of cache in modern computer systems:


L1 Cache: The smallest and fastest cache, found in each CPU core, stores frequently used data and instructions for immediate
access.
L2 Cache: Larger but slightly slower than L1, it's shared among CPU cores and acts as secondary storage for frequently
accessed data.
L3 Cache: The largest but slower cache shared by all cores, it helps reduce memory bottlenecks and ensures efficient data
sharing in multi-core processors.
Here are the primary significances of cache memory:

1. Improved CPU Performance


2. Reduced Memory Latency
3. Enhanced Multitasking and Parallelism
4. Efficient Use of Main Memory
5. Energy Efficiency
6. Cost-Effective Performance Improvement
7. Smoother User Experience
Typical Instruction
OR
Fig. Instruction cycle execution
Example:
Binary to Decimal Conversion:

Binary to Decimal Conversion Steps

 First, write the given binary number and count the powers of 2 from right to left (powers starting from 0)
 Now, write each binary digit (right to left) with the corresponding powers of 2 from (right to left), such that first binary digit
(MSB) will be multiplied with the greatest power of 2.
 Add all the products in the above step
 The final answer will be the required decimal number
Convert the binary number (1101)2 into a decimal number.
Solution:
Given binary number = (1101)2
Now, multiplying each digit from MSB to LSB with reducing the power of the base number 2.

3 2 1 0
1×2 +1×2 +0×2 +1×2
=8+4+0+1
= 13

Decimal to binary Conversion:

Conversion steps:
1. Divide the number by 2.
2. Get the integer quotient for the next iteration.
3. Get the remainder for the binary digit.
4. Repeat the steps until the quotient is equal to 0.

Example #1
Convert 1310 to binary:
Division
Quotient Remainder Bit #
by 2

13/2 6 1 0

6/2 3 0 1

3/2 1 1 2

1/2 0 1 3

How to convert binary to hex


Convert every 4 binary digits (start from bit 0) to 1 hex digit, with this table:
Binary Hex
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F

Example:
Convert binary 11011002 to hex:
Convert every 4 binary bits (from bit0) to hex digit:
11011002 = 110 1100 = 6 C = 6C16

https://testbook.com/digital-electronics/types-of-number-system
(Student homework)
ASCII (American Standard Code for Information Interchange)

ASCII, which stands for "American Standard Code for Information Interchange," is a character encoding standard that represents text
characters and control codes using numeric values. In ASCII, each character is assigned a unique numeric code, or "ASCII number,"
which is a 7-bit binary number (ranging from 0 to 127 in decimal) that represents a specific character or control function.
For example, in ASCII:
 The ASCII number 65 represents the uppercase letter 'A'.
 The ASCII number 97 represents the lowercase letter 'a'.
 The ASCII number 32 represents the space character.
 The ASCII number 48 represents the digit '0'.
 The ASCII number 33 represents the exclamation mark '!'.

https://www.w3schools.com/charsets/ref_html_ascii.asp
Difference between RISC and CISC Computers

RISC (Reduced Instruction Set Computer) and CISC (Complex Instruction Set Computer) are two different computer architectures that
define how a computer's central processing unit (CPU) executes instructions. These architectures have evolved over time and have
distinct characteristics:
1. CISC (Complex Instruction Set Computer):
 CISC processors have a large and diverse set of instructions, with some instructions performing complex operations.
 The instructions in a CISC architecture can vary in length, and they often require multiple clock cycles to execute.
 CISC processors typically have more addressing modes and can directly operate on memory, making them more
versatile for certain tasks.
 Historically, CISC architectures were designed to simplify programming by providing a wide range of high-level
instructions, reducing the number of instructions needed to perform a particular task.
2. RISC (Reduced Instruction Set Computer):
 RISC processors have a smaller and more uniform set of instructions, with each instruction designed to perform a
single, simple operation.
 RISC instructions are typically of fixed length and execute in a single clock cycle, which makes RISC processors faster for
many common operations.
 RISC architectures often rely on optimizing the compiler to generate efficient code, as they have fewer addressing
modes and do not directly access memory.
 The idea behind RISC is to streamline the CPU's instruction set, allowing it to execute instructions more quickly and
efficiently.
Here are some key differences and considerations when comparing RISC and CISC architectures:
1. Instruction Set Complexity:
 CISC architectures have a more extensive and complex instruction set.
 RISC architectures have a simplified and reduced instruction set.
2. Instruction Execution:
 CISC instructions can be more powerful but may take more clock cycles to execute.
 RISC instructions are simpler and execute quickly, often in a single clock cycle.
3. Pipeline Efficiency:
 RISC processors are typically better at pipelining, which allows for more efficient parallel processing of instructions.
 CISC processors may have longer pipelines, leading to potential pipeline stalls.
4. Memory Access:
 CISC processors can often perform memory operations directly within the instructions.
 RISC processors typically rely on load-store architectures, where memory operations are separate from arithmetic and
logic operations.
5. Energy Efficiency:
 RISC architectures are often more power-efficient due to their simplified instruction set and shorter execution times.
6. Compiler Dependency:
 RISC architectures may require more work from compilers to optimize code for efficient execution.
 CISC architectures aim to simplify programming by providing higher-level instructions, which may require less compiler
optimization.
CISC and RISC architectures represent different approaches to designing computer CPUs. CISC processors have more complex
instructions and are designed to make programming easier, while RISC processors have simpler instructions and are designed for faster
and more efficient execution of instructions. The choice between them depends on specific application requirements and trade-offs
between complexity and performance.
S.No. RISC CISC

It stands for Complex Instruction Set


1. It stands for Reduced Instruction Set Computer.
Computer.

It is a microprocessor architecture that uses small This offers hundreds of instructions of


2.
instruction set of uniform length. different sizes to the users.

This architecture has a set of special purpose


These simple instructions are executed in one clock
3. circuits which help execute the instructions at
cycle.
a high speed.

4. These chips are relatively simple to design. These chips are complex to design.

5. They are inexpensive. They are relatively expensive.

Examples of RISC chips include SPARC, POWER Examples of CISC include Intel architecture,
6.
PC. AMD.

7. It has less number of instructions. It has more number of instructions.

It has variable-length encodings of


8. It has fixed-length encodings for instructions.
instructions.

The instructions interact with memory using


9. Simple addressing formats are supported.
complex addressing modes.

It has a large number of instructions. It


10. It doesn't support arrays.
supports arrays.

11. It doesn't use condition codes. Condition codes are used.

https://www.geeksforgeeks.org/computer-organization-and-architecture-tutorials/

https://www.javatpoint.com/computer-organization-and-architecture-tutorial

https://easyexamnotes.com/bus-structure-in-computer-organization/

You might also like