Docsity

Computer communication theory notes, Lecture notes of Computer Science

Toggle sidebar
bg1
MASENO UNIVERSITY
CIT 120: Computer Organization & Architecture
Week 2: Data Representation and Number Systems
1. Introduction
Overview
Computers do not understand human languages; they operate using numbers. Data
representation refers to how information such as numbers, text, images, and sound is stored and
processed in a computer. The number system is the foundation of data representation in digital
systems, with binary, octal, decimal, and hexadecimal systems playing a crucial role in
computing.
Relevance
Understanding data representation and number systems is vital because:
It enables IT professionals to store and manipulate data efficiently.
It helps in error detection and correction in data transmission.
It is essential for programming, networking, and digital circuit design.
It allows for efficient memory and data processing in modern computing devices.
2. Key Concepts
Types of Number Systems
Computers use different number systems to process and store data. The four key number systems
are:
1. Decimal (Base 10)
o Used in everyday life, consisting of digits 0-9.
o Example: 345 in decimal means (3 × 10²) + (4 × 10¹) + (5 × 10⁰).
2. Binary (Base 2)
o Used by computers, consisting of only 0s and 1s.
o Example: 1011 in binary means (1 × 2³) + (0 × 2²) + (1 × 2¹) + (1 × 2⁰) = 11 in
decimal.
3. Octal (Base 8)
o Uses digits 0-7 and is commonly used in digital electronics.
o Example: 75 in octal is equivalent to (7 × 8¹) + (5 × 8⁰) = 61 in decimal.
4. Hexadecimal (Base 16)
pf3
pf4

Partial preview of the text

Download Computer communication theory notes and more Lecture notes Computer Science in PDF only on Docsity!

MASENO UNIVERSITY

CIT 120: Computer Organization & Architecture

Week 2: Data Representation and Number Systems

1. Introduction

Overview

Computers do not understand human languages; they operate using numbers. Data representation refers to how information such as numbers, text, images, and sound is stored and processed in a computer. The number system is the foundation of data representation in digital systems, with binary, octal, decimal, and hexadecimal systems playing a crucial role in computing.

Relevance

Understanding data representation and number systems is vital because:  It enables IT professionals to store and manipulate data efficiently.  It helps in error detection and correction in data transmission.  It is essential for programming, networking, and digital circuit design.  It allows for efficient memory and data processing in modern computing devices.

2. Key Concepts

Types of Number Systems

Computers use different number systems to process and store data. The four key number systems are:

  1. Decimal (Base 10) o Used in everyday life, consisting of digits 0 - 9. o Example: 345 in decimal means (3 × 10²) + (4 × 10¹) + (5 × 10⁰).
  2. Binary (Base 2) o Used by computers, consisting of only 0s and 1s. o Example: 1011 in binary means (1 × 2³) + (0 × 2²) + (1 × 2¹) + (1 × 2⁰) = 11 in decimal.
  3. Octal (Base 8) o Uses digits 0 - 7 and is commonly used in digital electronics. o Example: 75 in octal is equivalent to (7 × 8¹) + (5 × 8⁰) = 61 in decimal.
  4. Hexadecimal (Base 16)

o Uses digits 0 - 9 and letters A-F (where A=10, B=11, ..., F=15). o Example: 2F in hexadecimal is (2 × 16¹) + (15 × 16⁰) = 47 in decimal.

Binary Arithmetic

Binary numbers follow similar arithmetic rules as decimal numbers. The fundamental operations include:

  1. Binary Addition: o 0 + 0 = 0 o 0 + 1 = 1 o 1 + 0 = 1 o 1 + 1 = 10 (carry 1 to the next column)
  2. Binary Subtraction: o 1 - 0 = 1 o 1 - 1 = 0 o 10 - 1 = 1 (borrowing required)
  3. Binary Multiplication: o Follows similar rules as decimal multiplication but only uses 0s and 1s.
  4. Binary Division: o Works like decimal division but follows binary rules. 3. Applications of Data Representation and Number Systems Data representation plays a key role in:  Computer Memory: Computers store all information (text, images, videos) in binary form.  Networking: Data transmission over the internet relies on binary encoding.  Programming: Low-level programming languages (e.g., Assembly) use hexadecimal notation.  Digital Electronics: Hardware components use octal and hexadecimal representations to process instructions efficiently.

Example:

In web design, colors are represented in hexadecimal format. The color white is represented as #FFFFFF, where each pair represents red, green, and blue (RGB) values in hexadecimal.

4. Techniques and Tools To work with number systems, several tools and techniques are commonly used:  Conversion Methods: o Decimal to Binary: Divide the decimal number by 2 and record the remainder.

Sample Answer: Hexadecimal notation is used to represent large binary values more compactly. It is commonly used in memory addresses, color coding in web design, and error detection in networking.

7. Connections to Course TextsStallings, W. (2015). Computer Organization and Architecture: Designing for Performance – Covers number systems, binary arithmetic, and data representation.  Patterson, D.A., & Hennessy, J.L. (2013). Computer Organization and Design: The Hardware/Software Interface – Explores data representation in computer systems.  Journal of Computer Science and Technology – Discusses new methods of optimizing binary processing. 8. SummaryNumber systems (binary, decimal, octal, hexadecimal) are essential for computer operations.  Binary arithmetic forms the basis of computation in digital circuits.  Conversions between number systems are critical for understanding data processing.  Applications include memory storage, networking, programming, and digital electronics.  Challenges include precision loss, storage issues, and human readability.  Understanding number systems is crucial for designing efficient computing systems and applications.