0% found this document useful (0 votes)
5 views23 pages

Computer Languages

The document provides an overview of computer programming languages, including machine, assembly, and high-level languages, along with their characteristics and uses. It also explains the operating system's role, the bootstrap process for loading an OS, and the program execution process in the CPU. Additionally, it describes the function of various registers involved in instruction execution and the benefits of bootstrapping in managing software components.

Uploaded by

NAKUL VTV
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)
5 views23 pages

Computer Languages

The document provides an overview of computer programming languages, including machine, assembly, and high-level languages, along with their characteristics and uses. It also explains the operating system's role, the bootstrap process for loading an OS, and the program execution process in the CPU. Additionally, it describes the function of various registers involved in instruction execution and the benefits of bootstrapping in managing software components.

Uploaded by

NAKUL VTV
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/ 23

Computer Languages

• Computer programming language, any of various


languages for expressing a set of detailed instructions
for a digital computer.
Machine level language
• A machine language consists of the numeric codes for the
operations that a particular computer can execute directly.
• The codes are strings of 0s and 1s, or binary digits (“bits”),
which are frequently converted both from and to hexadecimal
(base 16) for human viewing and modification.
• Machine language instructions typically use some bits to
represent operations, such as addition, and some to represent
operands, or perhaps the location of the next instruction.
• Machine language is difficult to read and write, since it does
not resemble conventional mathematical notation or human
language, and its codes vary from computer to computer.
Assembly level language
• Assembly language is one level above machine language.
• It uses short mnemonic codes for instructions and allows the
programmer to introduce names for blocks of memory that hold
data.
• One might thus write “add pay, total” instead of
“0110101100101000” for an instruction that adds two numbers.
• Assembly language is designed to be easily translated into
machine language.
• Like machine language, assembly language requires detailed
knowledge of internal computer architecture.
• It is useful when such details are important, as in programming a
computer to interact with peripheral devices (printers, scanners,
storage devices, and so forth).
High level language
• High-level languages are designed to be used by the human
operator or the programmer.
• They are referred to as "closer to humans." In other words,
their programming style and context is easier to learn and
implement than low-level languages, and the entire code
generally focuses on the specific program to be created.
• A high-level language does not require addressing hardware
constraints when developing a program. However, every single
program written in a high-level language must be interpreted
into machine language before being executed by the computer.
• BASIC, C/C++ and Java are popular examples of high-level
languages.
Operating System
• The Operating System is system software. It manages all
the computer resources.
• An operating system acts as an interface between the
software and different parts of the computer or the computer
hardware.
• The operating system is designed in such a way that it can
manage the overall resources and operations of the computer.
• Examples of Operating Systems are Windows, Linux, Mac OS,
etc.
• The Operating System comes with a large number of device
drivers that makes OS services reachable to the hardware
environment.
Operating System
Bootstrap process
• The bootstrap process, also known as booting, is the
process that loads and initializes an operating
system (OS) on a computer. The process involves
several steps, including:
Initializing hardware: The bootstrap loader, also
known as the BIOS or UEFI, initializes hardware,
memory, and other system components.
Loading the operating system: The bootstrap
loader locates and loads the operating system into
the computer's memory.
Preparing for user commands: The computer is
now ready to accept user commands.
• There are two types of booting in a computer: cold booting
and warm booting:
Cold booting
• This is when a computer is started for the first time or after it
has been completely shut down. The computer reads the BIOS
from ROM and loads the operating system into memory.
Warm booting
• This is when a computer is restarted while it is still powered on.
Warm booting is also known as rebooting. It's often done to
restart the operating system after a system crash or freeze, or
to set up configuration for newly installed software or hardware.
Warm boots are usually faster than cold boots.

• Booting is the process of restarting a computer or its operating


system software.
Bootstrapping
• The bootstrapping process does not require any outside input
to start. Any software can be loaded as required by the
operating system rather than loading all the software
automatically.
• The bootstrapping process is performed as a chain i.e. at each
stage, it is the responsibility of the simpler and smaller
program to load and execute and then execute the larger,
more complicated program of the next stage.
• The booting procedure starts with the hardware procedures
and then continues onto the software procedures that
are stored in the main memory.
• The bootstrapping process involves self-tests, loading
BIOS, configuration settings, hypervisor, operating
system etc.
bootstrap program
Bootstrap Program
• A bootstrap program is the first code that is executed
when the computer system is started. The entire
operating system depends on the bootstrap program to
work correctly as it loads the operating system.
• In the image, the bootstrap program is a part of ROM
which is the non-volatile memory.
• The operating system is loaded into the RAM by the
bootstrap program after the start of the computer system.
Then the operating system starts the device drivers.
Benefits of Bootstrapping
• Without bootstrapping, the computer user would have
to download all the software components, including the
ones not frequently required.
• With bootstrapping, only those software components
need to be downloaded that are legitimately required
and all extraneous components are not required.
• This process frees up a lot of space in the memory and
consequently saves a lot of time.
Program Execution in the CPU
1. A sequence of instructions is stored in memory.
2. The memory address wherever the first instruction is found is
copied to the instruction pointer called Program counter
(PC).
3. The CPU sends the address in the instruction pointer to
memory on the address bus.
4. The CPU sends a “read” signal to the control bus.
5. Memory responds by sending a copy of data (in bits) at that
memory location on the data bus, which the CPU then
copies into its instruction register.
6. The instruction pointer is automatically incremented to
contain the address of the next instruction in memory.
7. The CPU executes the instruction within the instruction
register.
8. Go to step 3
• Steps 3, 4, and 5 are called an instruction fetch. Notice that
Example
• we have two numbers 3 and 2 and we will add these
two numbers. For example;
• 3+2=5. Now lets see step by step how all this process
will complete inside memory and CPU registers.
Description
1.1940 on address 300
1.1 is opcode to Load AC (accumulator) from memory
2.940 is address and value of 003 is on this address
2.5941 on address 301
1.5 is opcode to Add to AC from Memory
2.941 is address and value of 002 is on this address
3.2941 on address 302
1.2 is opcode to Store AC (accumulator) to Memory
2.941 is addressed and the value of 002 is on this address at
the start and after execution of the complete program, it is
updated with 5.
Opcodes
• Suppose that we have 16 bits, then the first 4 bits
represent opcode, and the remaining 12 bits represent
the address of the instruction.
• 0001= 1 = Load AC (accumulator) from memory
• 0010= 2 = Store AC (accumulator) to Memory
• 0101= 5 = Add to AC from Memory
• For example, instruction 1940 is on address 300, its
leftmost number is 1, so we take it as an opcode for the
instruction. 1 means to Load AC (accumulator) from
memory
• MAR Register: The PC register allows an instruction, and
then send this instruction to the MAR register. MAR register
is the memory address register.
• MBR Register: With the help of the MAR register, the MBR
register buffers the instruction. MBR register is the memory
buffer register.
• IR Register: The IR register is the instruction register. IR
Register tells the CPU which instruction is being executed.
• AC Register: The AC register is the accumulator register.
The AC register helps to temporarily store the values.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy