



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Inside this PDF, you will find a complete journey of data. It starts with the math of bases, moves through binary arithmetic, explains the coding of characters like ASCII and Unicode, and finishes with the logic used to handle signed negative numbers. It is a bridge between human logic and machine execution.
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Introduction to information representation and base numbering systems.
Every numbering system is based on a base (b) where:
Base 10 (Decimal): Uses 0-9 digits.
Base 2 (Binary): Uses 0-1 digits.
Each number in base (b) is made by combining digits from the set of symbols allowed in that
base.
Note: Always specify the base to avoid confusion (101) 2
, except for base 10 which
is the useful base for humans.
Principle of Euclidean Division: X = q.B + r
Divide the number by the base repeatedly.
Record the remainders (until q < B).
Write remainders from last to first.
Example: (19) 10
Basic Operations in Binary System
Follows 4 simple rules:
Operation Carry Result
Ex: 1011 + 1101 = 11000
(When 1 + 1, we write 0 and carry 1 to the next column, just like 9 +
1 in decimal).
Also has 4 rules:
Operation Carry (Borrow) Result
Ex: 1001 - 1101 = 0100 (borrowing 1 turns the 1 to 0 and adds 2 in
binary to the current column).
This chapter explains how diverse information (numbers, text, images, sound) is represented
in a computer using binary code (0s and 1s).
Computers use bits (binary digits) to represent information. n bits can represent 2
n unique
pieces of information.
Explanation:
1 bit → 2 informations (
2 bits → 4 informations (
3 bits → 8 informations (
The procedure:
n
n
i
i+
i
(for i = n-1 to 0)
⊕ is called XOR: a ⊕ b = 1 if a ≠ b (different), else 0.
Example: (1011) 2
to Gray Code
n=4 digits (B 3
Result: Gray Code = 1110
In Base 10, digits 0-9 are replaced by the BCD code (4-bit binary equivalent).
Example: X = 687
BCD code: 0110 1000 0111
Used in digital systems. Represents each decimal digit by adding 3 (0011) 2
to its BCD code.
Principle: Xs-3 = BCD code + (0011)
Example: X = 9
4. Number Representation
The Most Significant Bit (MSB) is the sign:
0 indicates a positive number
1 indicates a negative number
Range for n bits: -(
n-
n-
Principle: A negative number is the bitwise logical NOT of its positive counterpart.
SAV is positive: Range same as SAV.
SAV is negative: Change 0 by 1 and vice versa (flip bits), keeping the sign bit.
Example: +30 = (11110) 2
in 5 bits + sign bit
CP1 (-30) = 1 | 00001 (flip number bits, keep sign)