Professional Documents
Culture Documents
Dr Mohsan Waseem
2 / 39
Number Systems
The Decimal System
...a4 104 +a3 103 +a2 102 +a1 101 +a0 100 +.a−1 10−1 +a−2 10−2 +a−3 10−3 +...
3 / 39
Number Systems
The Decimal System
4 / 39
Number Systems
The Binary System
1 × 24 + 1 × 23 + 0 × 22 + 1 × 21 + 0 × 20 + 1 × 2−1 + 1 × 2−2 =?
5 / 39
Number Systems
The Binary System
6 / 39
Number Systems
Gernalised Number System
7 / 39
Number Systems
Gernalised Number System
4 × 53 + 0 × 52 + 2 × 51 + 1 × 50 + 2 × 5−1 =?
8 / 39
Number Systems
Gernalised Number System
4 × 53 + 0 × 52 + 2 × 51 + 1 × 50 + 2 × 5−1 = (511.4)10
9 / 39
Number Systems
Octal Number System
1 × 82 + 2 × 81 + 7 × 80 + 4 × 8−1 = (87.5)10
10 / 39
Number Systems
Hexadecimal Number System
11 / 39
Number Systems
Binary Digits: Bits
12 / 39
Number Systems
Binary Arithmetic Rules
Addition
101101 + 100111 =
13 / 39
Number Systems
Binary Arithmetic Rules
Subtraction
101101 − 100111 =
14 / 39
Number Systems
Binary Arithmetic Rules
Multiplication
1011 × 101 =
15 / 39
Number Systems
Base Conversion
16 / 39
Number Systems
Base Conversion
17 / 39
Number Systems
Base Conversion
18 / 39
Number Systems
Base Conversion
19 / 39
Number Systems
Base Conversion
20 / 39
Number Systems
Base Conversion
21 / 39
Number Systems
Base Conversion
22 / 39
Number Systems
Base Conversion
23 / 39
Number Systems
Base Conversion
24 / 39
Number Systems
Base Conversion
25 / 39
Number Systems
Base Conversion
26 / 39
Number Systems
Base Conversion
27 / 39
Number Systems
Base Conversion
28 / 39
Number Systems
Binary Coded Decimal BCD
The binary number system is the most natural system for a computer
because it is readily represented in today’s electronic technology.
People however are more used to the decimal system.
How to resolve this issue?....
Convert Decimal to Binary
Perform calculations.
Convert Binary to Decimal
simple but there is a problem...
We need to store decimal numbers in the computer so that they can
be converted to binary and computers do not read decimal numbers.
they only accept binary codes.
We can represent the decimal digits by means of a code that
contains 1’s and 0’s.
The additional advantage is that it is possible to perform the
arithmetic operations directly on decimal numbers when they are
stored in the computer in coded form.
29 / 39
Number Systems
Binary Coded Decimal BCD
30 / 39
Number Systems
American Standard Code for Information Interchange (ASCII)
31 / 39
Binary Logic
32 / 39
Binary Logic
Logical Operations
33 / 39
Binary Logic
Logical Operations
34 / 39
Binary Logic
Logical Operations
35 / 39
Binary Logic
Logical Operations
36 / 39
Binary Logic
Logic Gates
Logic gates are electronic circuits that operate on one or more input
signals to produce an output signal.
Electrical signals such as voltages or currents exist as analog signals
having values over a given continuous range, say, 0 to 3 V.
In a digital system these voltages are interpreted to be either of two
recognizable values, 0 or 1.
Voltage operated logic circuits respond to two separate voltage
levels that represent a binary variable equal to logic 1 or logic 0.
37 / 39
Binary Logic
Logical Operations
38 / 39
Binary Logic
Logical Operations
39 / 39