Assignment 2 COA
Assignment 2 COA
Assignment-2
1. List the major components of a computer system?
Ans: The major components of a computer system are:
1. Central Processing Unit (CPU): The "brain" of the computer, which performs
all calculations and processing tasks.
2. Memory (RAM): Temporarily stores data and instructions needed for
processing. It enables quick access to data for running programs.
3. Storage (Hard Drive or SSD): Stores data and files permanently, even when
the computer is turned off. It holds the operating system, applications, and
personal files.
4. Motherboard: The main circuit board that connects all components of the
computer, allowing them to communicate with each other.
5. Power Supply Unit (PSU): Converts electrical power from an outlet into
usable power for the computer’s components.
6. Input Devices: Devices like a keyboard, mouse, and scanner that allow the
user to input data and interact with the computer.
7. Output Devices: Devices like a monitor, printer, and speakers that display or
produce information for the user.
8. Graphics Processing Unit (GPU): Handles rendering images, videos, and
animations, especially in gaming, design, and video editing.
9. Cooling System: Includes fans, heatsinks, and sometimes liquid cooling to
keep the components at a safe operating temperature.
10.Network Interface Card (NIC): Allows the computer to connect to a network,
either wired or wireless, for internet access and network communication.
Each component plays a specific role in enabling the computer to perform various functions
efficiently.
6. Explain the difference between the machine language and the assembly
language of the 8085 microprocessors?
Ans: The 8085 microprocessor has both machine language and assembly language for
programming, and each serves different purposes. Here’s a breakdown of the differences:
1. Machine Language
Definition: Machine language is the lowest-level programming language,
consisting entirely of binary code (0s and 1s) that the microprocessor can
directly execute.
Execution: Machine code is directly understood by the 8085 microprocessor
without needing any translation, making it faster to execute.
Format: Each instruction is represented by a sequence of binary numbers,
which makes it difficult to read and write for humans.
Use: Primarily used in applications where memory is very limited, and utmost
efficiency is required, as it’s more compact.
Example: An instruction like "MOV A, B" in machine code might be
represented as 01000111 in binary.
2. Assembly Language
Definition: Assembly language is a low-level programming language that uses
mnemonic codes or symbols instead of binary to represent each machine
language instruction.
Execution: Assembly code must be translated (or assembled) into machine
language by an assembler before the microprocessor can execute it.
Format: It is more readable for humans since it uses mnemonics like MOV,
ADD, and SUB to represent operations.
Use: Often used in systems programming or embedded programming where
control over hardware is required without the complexity of binary coding.
Example: The same instruction in assembly language would simply be written
as MOV A, B.
In summary, machine language is binary code directly executed by the 8085 microprocessor,
whereas assembly language uses mnemonics, making it more human-readable but
requiring translation to machine code for execution.
7. Define op code and operand, and specify the op code and the operand in
the instruction MOV H, L?
Ans: In computer programming, particularly in assembly language, an opcode (operation
code) and operand are fundamental parts of an instruction.
1. Opcode: This part of the instruction specifies the operation to be performed.
It tells the processor what action to execute, like addition, subtraction,
moving data, etc.
2. Operand: This part provides the data on which the operation is performed. It
could be a register, a memory location, or an immediate value (a direct value
in the code).
For the instruction MOV H, L:
Opcode: MOV — This instructs the processor to move data.
Operands: H and L — Here, H is the destination register, and L is the source
register. This means the contents of register L are moved to register H.