IL

Binary, Decimal, Hexadecimal

Binary, Decimal, Hexadecimal and Compression Study Guide

1. Binary, Decimal, Hexadecimal Relationships

  • Binary (Base 2): Uses two digits (0 and 1). Example: 1010 in binary is 10 in decimal.

  • Decimal (Base 10): Uses ten digits (0-9). Example: 10 in decimal is A in hexadecimal.

  • Hexadecimal (Base 16): Uses sixteen digits (0-9 and A-F). Example: A in hexadecimal is 10 in decimal.

Conversion Examples:

  • Binary to Decimal: Multiply each bit by 2 raised to its position (right to left).

    • Example: 1010 = (1 × 2³) + (0 × 2²) + (1 × 2¹) + (0 × 2⁰) = 8 + 0 + 2 + 0 = 10.

  • Decimal to Binary: Repeatedly divide the decimal number by 2, recording the remainders.

  • Hexadecimal to Decimal: Multiply each digit by 16 raised to its position.

    • Example: 1A = (1 × 16¹) + (10 × 16⁰) = 16 + 10 = 26.

2. Determining the Number of Bits Needed

  • Formula: Number of Bits = ⌈log₂(Number)⌉

  • Example: To represent the decimal number 100:

    • ⌈log₂(100)⌉ = ⌈6.64⌉ = 7 bits.

3. Computer Hardware/Software Elements and Network Configurations

Hardware Elements:

  • CPU: Executes instructions.

  • RAM: Temporary storage for active processes.

  • Storage (HDD/SSD): Permanent storage for data.

  • Motherboard: Connects all hardware components.

  • NIC: Manages network connections.

Software Elements:

  • Operating System (OS): Manages hardware and software resources.

  • Applications: Software for specific tasks (e.g., Word, Chrome).

  • Drivers: Allow the OS to communicate with hardware.

Network Configurations:

  • Client-Server Model: Central server provides services to clients.

  • Peer-to-Peer Network: Devices communicate directly.

  • LAN: Local Area Network for a specific area (e.g., home, office).

  • WAN: Wide Area Network covering a large geographical area.

4. Lossy vs. Lossless Compression

  • Lossy Compression:

    • Some data is permanently removed.

    • Common for audio, video, images (e.g., JPEG, MP3).

  • Lossless Compression:

    • No data is lost, can be perfectly restored.

    • Used for text, documents, and some images (e.g., PNG, ZIP).