MODULE I
Introduction: System software and machine architecture. The simplified Instructional
Computer (SIC&SIC/XE)- Data and instruction formats – addressing modes - instruction sets
- I/O and programming.
SYSTEM SOFTWARE
• System software consists of variety of programs that support operations of a
computer.
• It is a set of programs that manage a computer's hardware and applications.
• Required to administer the resources of the computer system.
• It works as a linking interface between a hardware device and the end-user.
• Runs in the background and manages all functioning of the computer itself.
• It is called Low-Level Software as it runs at the most basic level of computer and is
usually written in a low-level language.
• These software’s make it possible for the user to focus on an application, without
needing to know the details of how the machine works internally.
• It is usually written in a low-level language.
• Different types of system software are:
1. Operating System
2. Programming Language Translators
3. Device Drivers
4. Firmware Software
5. Utility Software
1. Operating System
• Most basic type of System Software that manage computer hardware and software.
• Responsible for the smooth functioning of any computer device.
• An OS primarily operates your computer when you start it.
• No OS on your computer, then you will not be able to start your computer.
• E.g. macOS, Linux, Android, and Microsoft Windows.
2. Programming Language Translators
• Programming translators are the software that converts high-level language into
machine language.
• A computer can only understand the machine language, either 0 or 1.
• End-user interacts with the computer in a high-level language like Java, Python, C,
PHP, and C++, etc., then the translator converts these languages into machine code.
• Various language translators are Assembler, Interpreters and Compilers.
1. Compiler- Translates an entire program written in a high-level
programming language (e.g., C, Java) into machine code or an
intermediate form in one go.
Key Features:
o Translates the entire program at once.
o Provides a list of all errors after compilation.
o Generates an executable file, which can be run independently.
o Faster execution since the code is precompiled.
o Eg: GCC (GNU Compiler Collection) for C/C++.
2. Interpreter
An interpreter translates and executes a program line-by-line. It does not
generate an intermediate file or machine code but directly executes the
instructions.
Key Features:
o Processes code one instruction at a time.
o Stops execution upon an error, making debugging easier
o No executable file is created.
Examples:
o Python Interpreter for Python.
3. Assembler
An assembler translates assembly language (low-level language) into machine
code. Assembly language is specific to a computer’s architecture and uses
mnemonics for instructions.
Key Features:
o Converts assembly instructions into binary machine code.
o Directly interacts with the hardware.
Examples:
MASM (Microsoft Macro Assembler).
3. Device Drivers
• The OS contains a number of device drivers to drive the hardware components.
• Most of the device drivers, such as a mouse, keyboards, etc., are already installed in
the computer system by the computer manufacturing companies.
• If any new device for the OS, users can install them through the internet also.
• Devices that require drivers to perform the smooth functioning are Keyboards,
Mouse, Printers etc
4. Firmware Software
• These are the operational software installed on the computer motherboards that help
the OS to identify the memories such as Flash, ROM, EPROM, EEPROM, and
memory chips.
• Primary function of any firmware software is to manage and control all activities of
individual devices.
• The BIOS (Basic Input/Output System) also works as a system program used for the
booting process of the system.
• First, it loads the OS into the main memory (RAM) of your system and then hands it
over to the OS.
• BIOS works as the substitute for the ROM chip; hence, it is called firmware software.
• A Firmware exists inside the devices while a device driver is installed in the operating
system.
5. Utility Software
• Act as an interface between system software and application software.
• It is a third-party tool designed to reduce maintenance issues and detect errors.
o It helps users to protect against threats and viruses.
o It helps to reduce disk size such as WinRAR, WinZip.
o It facilitates users to back up the old data and enhance the security of the system.
o It helps to recover the lost data.
SIMPLIFIED INSTRUCTIONAL COMPUTER(SIC)
Machine Architecture - Data and Instruction Format- Addressing Modes- Instruction Sets-
I/O And Programming
• Simplified Instructional Computer (SIC) is a hypothetical computer that includes the
hardware features most often found on real machines
• There are two versions of this machine:
o SIC standard Model
o SIC/XE (extra equipment or expensive)
Machine Architecture of SIC Standard Model
1. Memory of SIC
• It consists of bytes (8 bits).
• There are totally 32,768(215 bytes) bytes in memory.
• 3 consecutive byte = 1 word (24 bits = 1 word)
2. Registers of SIC
• There are 5 registers in SIC.
• Each register is 24bits in length.
3. Data Format in SIC
• Integers are represented by 24 bits.
• Negative numbers are represented in 2’s complement.
• Characters are represented by 8-bit ASCII value.
• No floating-point representation is available.
4. Instruction Format in SIC
• All instructions in SIC have 24-bit format.
5. Addressing Modes in SIC
• The different ways of specifying the location of an operand in an instruction are called
as addressing modes.
• There are two types of addressing mode in SIC
o Direct Addressing Mode:
o Indexed addressing mode:
6. Instruction Set in SIC
o The following are the types of instructions used in SIC
o Load and Store Instructions: To move or store data from accumulator to memory or
vice-versa. E.g.: LDA, STA, LDX, STX.
o Comparison Instructions: Used to compare data in memory by contents in
accumulator. E.g.: COMP.
o Arithmetic Instructions: Used to perform operations on accumulator and memory and
store result in accumulator. E.g.: ADD, SUB, MUL, DIV etc.
o Conditional Jump: compare the contents of accumulator and memory and performs
task based on conditions. E.g.: JLT, JEQ, JGT
o Subroutine Linkage: Instructions related to subroutines. Jump to the subroutine by
placing return address in register L. E.g.: JSUB, RSUB
7. Input and Output in SIC
• It is performed by transferring 1 byte at a time from or to rightmost 8 bits of
accumulator.
• Each device has 8-bit unique code.
• There are 3 I/O instructions:
o Test Device (TD) tests whether device is ready or not. Condition code in
Status Word Register is used for this purpose. If cc is < then device is ready
otherwise device is busy.
o Read data (RD) reads a byte from device and stores in register A.
o Write data (WD) writes a byte from register A to the device.
SIMPLIFIED INSTRUCTIONAL COMPUTER(SIC/XE)
Machine Architecture - Data and Instruction Format- Addressing Modes- Instruction Sets-
I/O And Programming
• Simplified Instructional Computer (SIC/XE) is a hypothetical computer that includes
the hardware features most often found on real machines.
Machine Architecture of SIC/XE Standard Model
1. Memory
o Memory consists of 8-bit bytes.
o Maximum memory is 1 megabyte (220 bytes).
o Any 3 consecutive bytes form a word. (24bits)
2. Registers
• There are 9 registers, each 24-bits in length.
Mnemonic Number Use
A 0 Accumulator, used for
arithmetic operations
X 1 Index register, used for
addressing
L 2 Linkage register,
contains return address
whenever control
transferred to subroutine
B 3 Base register, used for
addressing
S 4 General working
register
T 5 General working
register
F 6 Floating point
accumulator
PC 8 Program counter,
contains address of next
instruction to be
executed
SW 9 Status word, including
condition code
3. Data formats
• Integers are stored as 24-bit binary number.
• Negative numbers are represented using 2’s complement
• Characters are stored using 8-bit ASCII code.
• Support 48bit floating point numbers
• If the exponent has value e and fraction has value f, absolute value is represented as
• Sign indicated by value of s=1 means negative and s=0 is positive.
4. Instruction formats
• e=0, means Format 3 else Format 4.
• The n, i, x, b, p, and e bits are used to determine the instruction’s addressing mode
and memory access behaviour.
n- indirect addressing
i- immediate addressing
x- indexed addressing
b- base-relative addressing
p- program counter-relative addressing
e- extended format
5. Addressing modes
Indirect addressing
• The operand is a pointer to the memory address where the actual value is
stored.
LDA @1000
• The value at memory address 1000 is fetched and loaded into the accumulator.
Immediate Addressing
• The operand is the value itself (not an address).
LDA #5
• In this case, the value 5 is loaded directly into the accumulator.
Indexed Addressing
• The operand's address is calculated by adding the content of the index register
(X) to the specified address.
LDA 1000, X
• If X = 5, the address accessed is 1005. The value at this calculated address is
loaded into the accumulator.
Base-relative Addressing
• The effective address is calculated as the sum of the base register (B) and a
displacement.
BASE 2000
LDA 300
• The effective address is 2000 + 300 = 2300.
Program Counter Relative Addressing
• The effective address is calculated relative to the current program counter
(PC).
LDA LABEL
• If LABEL is at a distance of 10 bytes from the current instruction, the
displacement is 10.
Extended format
• Used for instructions that require a 20-bit address. This mode is useful for
accessing memory beyond the 12-bit addressing range.
+LDA 1048576
• The instruction uses the full 20-bit address.
6. Instruction set
Load and Store registers – LDA, LDX, STA, STX, LDB, STB
Integer arithmetic operations- ADD, SUB, MUL, DIV
Floating point arithmetic operations – ADDF, SUBF, MULF, DIVF
Comparison instruction- COMP
Conditional jump instruction- JLT, JEQ, JGT
Subroutine linkage- JSUB, RSUB
Register move instruction- RMO
Register to register arithmetic operation- ADDR, SUBR, MULR, DIVR
7. Input and output
• It is performed by transferring 1 byte at a time from or to rightmost 8 bits of
accumulator.
• Each device has 8-bit unique code.
• There are 3 I/O instructions:
o Test Device (TD) tests whether device is ready or not. Condition code in
Status Word Register is used for this purpose. If cc is < then device is ready
otherwise device is busy.
o Read data (RD) reads a byte from device and stores in register A.
o Write data (WD) writes a byte from register A to the device.
• In SIC/XE, there are I/O channels that can be used to perform input and output while
CPU is executing other instructions.
• Allows overlap of computing and I/O, resulting in more efficient system operation.
• Instructions SIO, TIO, HIO are used to start, test and halt operation of I/O channel.
------****------