Computing Systems and Architecture · 3 min read
Logic Gates and Boolean Algebra · Operating Systems
Digital circuits are built from logic gates that perform Boolean operations.
Basic Logic Gates
The AND gate outputs 1 only if all inputs are 1. The OR gate outputs 1 if any input is 1. The NOT gate (inverter) outputs the opposite of its input. The NAND gate outputs 0 only if all inputs are 1 (inverted AND). The NOR gate outputs 1 only if all inputs are 0 (inverted OR). The XOR (exclusive OR) gate outputs 1 if inputs are different. The XNOR gate outputs 1 if inputs are the same.
| A | B | AND | OR | XOR | NAND | NOR |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 |
Truth Tables
Truth tables list all possible input combinations and corresponding outputs for a logic function. For a two-input AND gate: inputs 0,0 yield output 0; inputs 0,1 yield output 0; inputs 1,0 yield output 0; inputs 1,1 yield output 1.
Boolean Expressions
Boolean algebra uses variables with values 0 or 1 and operations AND (·), OR (+), and NOT (¬ or overline). Key laws include identity (A·1=A, A+0=A), null (A·0=0, A+1=1), complement (A·¬A=0, A+¬A=1), commutative (A·B=B·A, A+B=B+A), associative, and distributive laws. De Morgan's theorems state that ¬(A·B)=¬A+¬B and ¬(A+B)=¬A·¬B.
Circuit Design
Combinational circuits produce outputs based solely on current inputs. Examples include adders, multiplexers, and decoders. Sequential circuits have memory and produce outputs based on current inputs and previous states. Examples include flip-flops, registers, and counters.
An operating system (OS) is system software that manages hardware resources and provides services for application programs.
OS Functions
Process management involves creating, scheduling, and terminating processes. Memory management allocates and deallocates memory for programs. File system management organizes data storage and retrieval. Device management controls peripheral hardware through device drivers. Security and access control protect system resources and user data. User interface provides command-line or graphical interaction.
Process Management
A process is a program in execution, including its code, data, and execution state. Process states include new, ready, running, waiting, and terminated. The scheduler determines which process runs on the CPU. Scheduling algorithms include first-come-first-served (FCFS), shortest job first (SJF), priority scheduling, and round-robin. Context switching saves one process's state and loads another's.
A running process returns to ready when its time slice ends (round-robin) and moves to waiting when it requests input or output. When the input or output finishes, it goes back to ready, not straight to running.
Memory Management
Virtual memory allows programs to use more memory than physically available by using disk space as an extension of RAM. Paging divides memory into fixed-size blocks called pages. The memory management unit (MMU) translates virtual addresses to physical addresses. Page faults occur when a requested page is not in RAM and must be loaded from disk.
File Systems
A file system organizes data on storage devices. Files contain data; directories (folders) organize files hierarchically. Common file systems include NTFS (Windows), ext4 (Linux), HFS+ and APFS (macOS), and FAT32/exFAT (portable drives). File attributes include name, size, type, location, permissions, and timestamps.
Common Operating Systems
Windows is developed by Microsoft and dominates the desktop market. macOS is developed by Apple for Mac computers. Linux is an open-source OS kernel with many distributions (Ubuntu, Fedora, Debian). iOS and Android are mobile operating systems for smartphones and tablets.
Finished reading?
Lock it in with a quick Computing Systems and Architecture quiz.