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 77 bits to represent 128128 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 MP3MP3.

Images are composed of pixels, where resolution is determined by the number of pixels used. Binary images use 11 bit per pixel, while grayscale uses 88 bits (256256 levels). Color images typically use 2424 bits per pixel, with 88 bits dedicated to each of the Red, Green, and Blue channels (RGBRGB). Video data consists of a rapid sequence of these images, known as frames, defined by a frame rate such as 30 fps30\text{ fps}.

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 (19571957) for science, Lisp (19581958) for functional programming, and COBOL (19591959) 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 80858085 is an 88-bit microprocessor with a 1616-bit address bus capable of addressing up to 64KB64\text{KB} of memory. Its architecture includes general-purpose registers (B,C,D,E,H,LB, C, D, E, H, L), an Accumulator (AA) for primary operations, and a Flag Register indicating status such as Sign (SS), Zero (ZZ), and Carry (CYCY).

Assembly language uses mnemonics like MOVMOV (move), ADDADD (addition), and JMPJMP (jump) to represent machine instructions. An Assembler translates these mnemonics into binary machine code. The 80858085 instruction set is categorized into data transfer, arithmetic, logical (e.g., ANAANA for AND), branching (e.g., JZJZ for Jump if Zero), and machine control instructions like HLTHLT (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: 010010000110010101101100011011000110111101001000\,01100101\,01101100\,01101100\,01101111

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: JMP3000HJMP\,3000H

Which 8085 instruction performs a bitwise OR operation with the accumulator? Ans: ORAORA

Predict the result in registers after execution: MVI A, 05H; MVI B, 02H; MOV C, A; MOV D, B. Ans: A=05H,B=02H,C=05H,D=02HA=05H, B=02H, C=05H, D=02H

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: 00H00H