0% found this document useful (0 votes)
15 views8 pages

Computer Chapter 1 Notes (C)

it's is the best notes for olevel chapter 1

Uploaded by

Amjad Javed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views8 pages

Computer Chapter 1 Notes (C)

it's is the best notes for olevel chapter 1

Uploaded by

Amjad Javed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 8

Chapter 1: Data Representation

1.1 Binary Systems


Introduction to Binary:

Definition and Importance: Binary is a base-2 numeral system used by computers. It consists of only
two digits: 0 and 1. Each digit is called a bit.

Bits and Bytes: A bit is the smallest unit of data. A byte consists of 8 bits. For example, the binary
number 10101010 represents one byte.

Binary Counting: How to count in binary (e.g., 0, 1, 10, 11, 100, etc.).

Binary to Decimal Conversion:

Method: Multiply each bit by 2 raised to the power of its position, starting from 0 on the right.

Example: Convert 1101 to decimal:

(1 \times 2^3 + 1 \times 2^2 + 0 \times 2^1 + 1 \times 2^0 = 8 + 4 + 0 + 1 = 13)

Practice Problems: Convert 1010, 1111, and 1001 to decimal.

Decimal to Binary Conversion:


Method: Divide the decimal number by 2 and record the remainder. Repeat with the quotient until you
reach 0. The binary number is the remainders read in reverse.

Example: Convert 13 to binary:

13 ÷ 2 = 6 remainder 1

6 ÷ 2 = 3 remainder 0

3 ÷ 2 = 1 remainder 1

1 ÷ 2 = 0 remainder 1

Binary: 1101

Practice Problems: Convert 10, 15, and 9 to binary.

1.2 Hexadecimal Systems

Introduction to Hexadecimal:

Definition and Usage: Hexadecimal is a base-16 numeral system used in computing for its compact
representation. It uses digits 0-9 and letters A-F.

Hexadecimal Digits: 0-9 represent values 0-9, and A-F represent values 10-15.

Hexadecimal to Binary Conversion:

Method: Convert each hexadecimal digit to its 4-bit binary equivalent.

Example: Convert 2F to binary:


2 = 0010

F = 1111

Binary: 00101111

Practice Problems: Convert A3, 4B, and 7E to binary.

Binary to Hexadecimal Conversion:

Method: Group binary digits into sets of four, starting from the right, and convert each group to its
hexadecimal equivalent.

Example: Convert 11011110 to hexadecimal:

1101 = D

1110 = E

Hexadecimal: DE

Practice Problems: Convert 10101010, 11110000, and 10011001 to hexadecimal.

Hexadecimal to Decimal Conversion:

Method: Multiply each digit by 16 raised to the power of its position, starting from 0 on the right.

Example: Convert 1A to decimal:

(1 \times 16^1 + A \times 16^0 = 16 + 10 = 26)

Practice Problems: Convert 2F, 3B, and 7C to decimal.

Decimal to Hexadecimal Conversion:


Method: Divide the decimal number by 16 and record the remainder. Repeat with the quotient until you
reach 0. The hexadecimal number is the remainders read in reverse.

Example: Convert 26 to hexadecimal:

26 ÷ 16 = 1 remainder 10 (A)

1 ÷ 16 = 0 remainder 1

Hexadecimal: 1A

Practice Problems: Convert 47, 59, and 123 to hexadecimal.

1.3 Data Storage

Character Encoding:

ASCII: American Standard Code for Information Interchange. Each character is represented by a 7 or 8-bit
binary number.

Example: ‘A’ = 65 = 01000001

Unicode: A more extensive encoding system that supports many languages and symbols. It uses 16 bits
or more.

Example: ‘A’ = U+0041


Image Storage:

Bitmap Images: Stored as a grid of pixels, each represented by a binary value indicating color.

Vector Images: Stored as mathematical equations representing shapes and lines.

Color Depth: Number of bits used to represent the color of a single pixel (e.g., 24-bit color).

Sound Storage:

Digitization: Converting analog sound waves into digital format using sampling.

Sampling Rate: Number of samples taken per second (e.g., 44.1 kHz).

Bit Depth: Number of bits used to represent each sample (e.g., 16-bit).

1.4 Data Compression

Introduction to Data Compression:

Importance: Reduces file size to save storage space and transmission time.

Types: Lossy and lossless compression.


Lossy Compression:

Definition: Reduces file size by removing some data, which may affect quality.

Examples: JPEG for images, MP3 for audio.

Use Cases: Suitable for applications where some loss of quality is acceptable.

Lossless Compression:

Definition: Reduces file size without losing any data.

Examples: ZIP files, PNG images.

Use Cases: Suitable for applications where data integrity is crucial.

Comparison of Lossy and Lossless Compression:

Advantages and Disadvantages:

Lossy: Smaller file size, reduced quality.

Lossless: Larger file size, preserved quality.


1.5 Additional Topics

Binary Arithmetic:

Addition: Adding binary numbers, handling carry-over.

Example: 1011 + 1101 = 11000

Subtraction: Subtracting binary numbers, using borrow.

Example: 1101 - 1010 = 0011

Overflow: When the result of an arithmetic operation exceeds the available number of bits.

Error Detection Methods:

Parity Bits: Adding an extra bit to make the number of 1s even (even parity) or odd (odd parity).

Checksums: Summing the data values and sending the sum along with the data for verification.

1.1 Denary (Decimal) System

Introduction to Denary:

Definition: The denary system, also known as the decimal system, is a base-10 numeral system. It uses
ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.

Importance: It is the most commonly used number system in everyday life.


Denary to Binary Conversion:

Method: Divide the denary number by 2 and record the remainder. Repeat with the quotient until you
reach 0. The binary number is the remainders read in reverse.

Example: Convert 45 to binary:

45 ÷ 2 = 22 remainder 1

22 ÷ 2 = 11 remainder 0

11 ÷ 2 = 5 remainder 1

5 ÷ 2 = 2 remainder 1

2 ÷ 2 = 1 remainder 0

1 ÷ 2 = 0 remainder 1

Binary: 101101

Practice Problems: Convert 29, 58, and 73 to binary.

Denary to Hexadecimal Conversion:

Method: Divide the denary number by 16 and record the remainder. Repeat with the quotient until you
reach 0. The hexadecimal number is the remainders read in reverse.

Example: Convert 255 to hexadecimal:

255 ÷ 16 = 15 remainder 15 (F)

15 ÷ 16 = 0 remainder

-------------------------------------------
Signature

You might also like