Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
7 views4 pages

Week 3 Notes

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

Week 3 Notes

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

COMPUTER NUMBER SYSTEM

A number system is a method of representing numbers using specific rules. It provides a consistent way to
express numerical values. In mathematics, we use various number systems to represent and manipulate numbers. Here
are the four most common types:
Decimal Number System (Base-10):
 The decimal system uses ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
 Each position to the left of the decimal point represents powers of 10 (units, tens, hundreds, thousands, etc.).
Binary Number System (Base-2):
 The binary system uses only two digits: 0 and 1.
 It is widely used in computer science and digital electronics.
Octal Number System (Base-8):
 The octal system uses eight digits: 0, 1, 2, 3, 4, 5, 6, and 7.
 It is less common but still used in some contexts.
Hexadecimal Number System (Base-16):
 The hexadecimal system uses sixteen digits: 0–9 and A–F (where A represents 10, B represents 11, and so on).
 It is commonly used in computer programming and memory addressing.

The number system plays a crucial role in mathematics and our daily lives.
1. Representation of Quantities:
 A number system provides a way to represent quantities. Whether it’s counting objects, measuring
distances, or calculating time, numbers allow us to express these concepts precisely.
 For example, when you count the number of apples in a basket or measure the length of a room, you’re
using the number system.
2. Foundation for Mathematical Concepts:
 All mathematical concepts and formulas are based on the number system. Whether you’re solving
equations, working with geometry, or analyzing data, numbers are fundamental
✧ From basic arithmetic operations (addition, subtraction, multiplication, division) to advanced calculus and
algebra, numbers underpin mathematical reasoning.
3. Types of Numbers:
 The number system encompasses various types of numbers:
a. Counting Numbers: These start with 1 and continue indefinitely (1, 2, 3, …).
b. Whole Numbers: Include all counting numbers along with zero (0, 1, 2, …).
c. Integers: Positive and negative whole numbers, including zero (-3, -2, -1, 0, 1, 2, 3, …).
d. Rational Numbers: Expressible as fractions (e.g., 3/4, -2/5).
e. Irrational Numbers: Cannot be expressed as fractions (e.g., √2, π).
f. Real Numbers: Encompass both rational and irrational numbers.
g. Even Numbers: Divisible by 2 (e.g., 2, 4, 6, …).
h. Odd Numbers: Not divisible by 2 (e.g., 3, 5, 7, …).
i. Prime Numbers: Divisible only by 1 and themselves (e.g., 5, 7, 13).
j. Composite Numbers: Have multiple factors (e.g., 10, 15, 28).
4. Digital Systems and Data Representation:
 Understanding number systems is essential for digital systems (like computers) because they process
data using binary representation (base-2).
 Computers use bits (0s and 1s) to represent information, and this binary system relies on the principles
of the number system. The number system is not only a mathematical tool but also a fundamental
aspect of our everyday interactions with the world. It allows us to quantify, calculate, and communicate
effectively.

BINARY NUMBERS
The binary number system is a fundamental concept in computer science and digital electronics. It uses a base-2
numeral system, which means it only employs two distinct symbols: 0 (zero) and 1 (one). Here are the key points about
binary numbers:
Representation:
 In binary, each digit is called a bit.
 The binary system is used internally by almost all modern computers and electronic devices because it directly
maps to electronic circuits using logic gates.
 Unlike our everyday decimal system (base 10), which uses ten symbols (0-9), binary uses only two symbols (0
and 1).
Conversion:
To convert a decimal number to binary, follow these steps:
1. Divide the decimal number by 2.
2. Use the integer quotient obtained as the dividend for the next step.
3. Continue dividing until the quotient becomes 0.
4. Write down the remainders in reverse order to get the binary representation.
Example: Convert 4 to Binary:
Let's convert the decimal number 4 to binary:
Step 1: Divide 4 by 2.
Quotient: 2, Remainder: 0
Step 2: Divide 2 by 2.
Quotient: 1, Remainder: 0
Step 3: Divide 1 by 2.
Quotient: 0, Remainder: 1
Reverse the remainders: 100
Therefore, 4 in binary is 100.
Bit in Binary Number:
A single binary digit is called a bit.
Examples:
10101 is a five-bit binary number.
101 is a three-bit binary number.
100001 is a six-bit binary number.

OCTAL NUMBERS
The octal number system is a base-8 system that uses digits from 0 to 7 to represent any number. It is similar to
other number systems like binary and hexadecimal. Here are some key points about octal numbers:
Base and Digits:
 The base of the octal system is 8. 30.
 It uses the digits 0, 1, 2, 3, 4, 5, 6, and 7.

Representation:
 Octal numbers are usually represented by binary numbers when grouped in pairs of three.
 For example, the octal number 128 is expressed as 0010102 in binary, where 1 is equivalent to 001 and 2 is
equivalent to 010.

Conversion:
 To convert decimal numbers to octal, we use the octal dabble method.
For example, to convert 56010 to octal:
560 ÷ 8 = 70 with a remainder of 0.
70 ÷ 8 = 8 with a remainder of 6.
8 ÷ 8 = 1 with a remainder of 0 .
1 ÷ 8 = 0 with a remainder of 1.
So, the octal representation is 10608.
Table of Octal Digits:
 We use only 3 bits to represent octal numbers.
 Each group has a distinct value between 000 and 111.
 Octal digits range from 0 to 7.

DECIMAL NUMBERS
A decimal number is a number that consists of a whole number and a fractional part separated by a point (often
called the decimal point).
Whole Number Part: The whole number part represents the integral value of the quantity. It can be any positive
or negative integer.
For example:
 In the decimal number 42.85, the whole number part is 42.
 In the decimal number -123.456, the whole number part is -123.
Fractional Part: The fractional part represents a value smaller than one. It appears after the decimal point.
For example:
 In the decimal number 42.85, the fractional part is 0.85.
 In the decimal number -123.456, the fractional part is 0.456.
Decimal Point: The decimal point separates the whole number part from the fractional part. It serves as a visual
indicator that we are dealing with a decimal.
For example:
 The decimal point in 42.85 separates 42 (whole) from 85 (fractional).
 The decimal point in -123.456 separates -123 (whole) from 456 (fractional).

Decimal numbers allow us to express quantities that are whole plus some part of a whole. They are commonly
encountered in everyday situations, such as grocery shopping, measurements, and financial calculations.

HEXADECIMAL NUMBER
The hexadecimal number system often simply called “hex,” is a base-16 numeral system. Unlike our familiar
base-10 (decimal) system, which uses ten symbols (0 to 9) to represent numbers, hexadecimal employs sixteen symbols.
These symbols include the numerals 0 to 9 and the letters A to F. Each digit in a hexadecimal number corresponds to a
specific value, allowing us to express quantities in a compact and efficient manner.

Base-16 Representation:
 Hexadecimal uses a base value of 16. This means that each column in a hexadecimal number represents a power
of 16.
 The sixteen symbols used in hexadecimal are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.
 For example, the hexadecimal number “1A” represents 1 × 16 + 10 = 26 in decimal.

Conversion to Other Systems:


 Hexadecimal numbers can be converted to other number systems:
 To decimal (base-10): Each digit is multiplied by the corresponding power of 16 and summed.
 To binary (base-2): Each hexadecimal digit corresponds to a 4-bit binary representation.
 To octal (base-8): First convert to decimal, then to octal.
 These conversions are essential in computer science and digital systems. Hexadecimal provides a convenient
way to work with binary data and efficiently represent values in various contexts.

Example: Convert the decimal number 456 to hexadecimal


1. Divide the decimal number by 16 and record the quotient and remainder.
2. Repeat the division using the quotient from the previous step until the quotient is zero.
3. The hexadecimal number is formed by the remainders read from bottom to top.
Steps:
1. Initial Number: 456
2. First Division:
 Divide 456 by 16.
 Quotient: 456÷16=28 (integer part)
 Remainder: 456 mod 16=8
3. So, 456 divided by 16 gives a quotient of 28 and a remainder of 8.
4. Second Division:
 Now divide the quotient from the first division (28) by 16.
 Quotient: 28÷16=1 (integer part)
 Remainder: 28 mod 16=12
5. So, 28 divided by 16 gives a quotient of 1 and a remainder of 12. Note that in hexadecimal, 12 is represented as
'C'.
6. Third Division:
 Now divide the quotient from the second division (1) by 16.
 Quotient: 1÷16=0 (integer part)
 Remainder: 1mod 16=11
7. So, 1 divided by 16 gives a quotient of 0 and a remainder of 1.
8. Construct the Hexadecimal Number:
 Write the remainders from the last to the first.
 The remainders are 1, 12 (C in hexadecimal), and 8.
9. Therefore, the hexadecimal representation of the decimal number 456 is 1C8.

You might also like