Computer Languages, Data Representation, and Operating Systems Overview
Data Representation in Computing
Computers process and store all data as sequences of bits, which humans interpret as text, images, or audio. Numeric data consists of integers and floating-point numbers stored in binary formats. Text is represented by assigning characters unique numeric codes through standards like ASCII, which uses bits to represent characters, or Unicode. Audio data is digitized through sampling analog sound waves at discrete intervals, followed by quantization to round amplitudes to fixed levels, and final binary encoding into formats like WAV or .
Images are composed of pixels, where resolution is determined by the number of pixels used. Binary images use bit per pixel, while grayscale uses bits ( levels). Color images typically use bits per pixel, with bits dedicated to each of the Red, Green, and Blue channels (). Video data consists of a rapid sequence of these images, known as frames, defined by a frame rate such as .
Evolution and Categorization of Programming Languages
Computer languages have evolved from Machine Language (binary code) in the 1940s to Assembly Language in the 1950s, which introduced symbolic mnemonics. High-level languages emerged later, including Fortran () for science, Lisp () for functional programming, and COBOL () for business. The 1970s saw the rise of C and Pascal, while the 1980s popularized Object-Oriented Programming (OOP) with C++. Modern development is dominated by languages like Java, known for its "Write Once, Run Anywhere" philosophy, Python, and specialized languages like Rust and Go.
Programming paradigms define the style of code organization. Imperative and Procedural programming focus on the sequence of statements and functions. Object-Oriented Programming organizes code into instances of classes called objects. Functional programming relies on pure functions and recursion, while Logic programming (e.g., Prolog) uses facts and rules. Declarative programming, such as SQL, describes the desired result rather than the specific steps to achieve it.
8085 Microprocessor and Assembly Language
The Intel is an -bit microprocessor with a -bit address bus capable of addressing up to of memory. Its architecture includes general-purpose registers (), an Accumulator () for primary operations, and a Flag Register indicating status such as Sign (), Zero (), and Carry ().
Assembly language uses mnemonics like (move), (addition), and (jump) to represent machine instructions. An Assembler translates these mnemonics into binary machine code. The instruction set is categorized into data transfer, arithmetic, logical (e.g., for AND), branching (e.g., for Jump if Zero), and machine control instructions like (halt). Control flow is managed by the Program Counter, which stores the address of the next instruction to be executed.
High-Level Language Design and Translation
Language design involves syntax, the structural rules of statements, and semantics, the meaning of those statements during execution. Variables are managed through binding values to names and scoping, which determines where a variable is accessible (Local, Enclosing, Global, or Built-in). Type checking ensures type safety and can be Static (performed at compile-time) or Dynamic (performed at runtime).
To run on hardware, high-level code must be translated. A Compiler processes the entire source code into a machine-readable file before execution (e.g., GCC or javac). An Interpreter translates and executes the code line-by-line (e.g., CPython). Effective languages also include error-handling mechanisms to manage runtime issues like division by zero.
Operating System Fundamentals and Functions
An Operating System (OS) is software that acts as an interface between the user and computer hardware. Notable examples include Windows, macOS, Linux, Android, and specialized systems like RTOS for embedded devices. The primary functions of an OS include Input/Output Management, Process Management (scheduling and execution), Memory Management (tracking RAM), File Management, and Security and Access Control.
Bootstrapping and System Startup
Bootstrapping is the process of loading the operating system into main memory (RAM) when the computer is powered on. Since the OS is stored on the hard disk, the CPU initially executes firmware (BIOS/UEFI) from a fixed address in ROM. This firmware locates a bootable device and initiates a Bootstrap Loader (such as GRUB), which loads the full OS kernel into RAM and transfers control to it to initialize system processes and drivers.
Questions & Discussion
Binary representation of the text "Hello"? Ans:
What process rounds sampled amplitudes to fixed levels? Ans: Quantization
What is the smallest unit of a digital image that holds color or intensity information? Ans: Pixel
Which programming language is known for "Write Once, Run Anywhere" due to its platform independence? Ans: Java
In which register is the instruction to be executed stored? Ans: Program Counter
Which assembly instruction directs the program to jump to memory address 3000H? Ans:
Which 8085 instruction performs a bitwise OR operation with the accumulator? Ans:
Predict the result in registers after execution: MVI A, 05H; MVI B, 02H; MOV C, A; MOV D, B. Ans:
What will be the output at port 08? MVI A, 04H; ANI 01H; JZ LABEL; MVI A, 01H; OUT 08H; HLT; LABEL: MVI A, 00H; OUT 08H; HLT. Ans: