You are on page 1of 26

Introduction to

Computer Concepts

Dr Aftab Khan
Department of Computer Science

aftab.khan@aiou.edu.pk
Basics of Digital Computer Unit-3
 Numbering System:
 Decimal Numbering System ….Human
 0123456789

 Binary Numbering System …..Computer


 01

 Octal Numbering System


 01234567

 Hexadecimal Numbering System


 0123456789ABC
DEF
3576 Introduction to Computer Concepts 2
Basics of Digital Computer Unit-3
Decimal Binary Octal Hex
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17Computer Concepts
3576 Introduction to F 3
Basics of Digital Computer Unit-3

Decimal System:
 Consists of 10 symbols or digits.
 Total number of symbols is called base
 Here total number of digits or symbols are 10
i.e. from 0 9
 Decimal system is positional system
 Decimal means 10. Decimal System is the
numbering system used by humans, which is
based on 10 digits.

3576 Introduction to Computer Concepts 4


Basics of Digital Computer Unit-3

Binary System:
 This system is used by computer system.
 It consists of (0, 1) such is called OFF and ON.
 The following coding system is used by
computer for alphanumeric data in binary
system
 ASCII: American Standard Code for Information Interchange
 EBCDIC: Extended Binary Coded Decimal Interchange Code
 ANSI: American National Standards Institute
 Unicode: Industry standard for the consistent
representation and handling of text expressed in most of
the world's writing systems.

3576 Introduction to Computer Concepts 5


Basics of Digital Computer Unit-3

Binary to Decimal:

3576 Introduction to Computer Concepts 6


Basics of Digital Computer Unit-3

Binary System:
Convert From Decimal To Binary
We can convert a decimal number into a
binary number by repeatedly dividing the
base ten number by two. Then, write the
remainders from the bottom to the top as
the answer:

3576 Introduction to Computer Concepts 7


Basics of Digital Computer Unit-3

Binary System:
Example:
Write each of the following base ten
numbers as a binary number:
a) 510
b) 7810

3576 Introduction to Computer Concepts 8


Basics of Digital Computer Unit-3

Binary System:
Solution:
a)

3576 Introduction to Computer Concepts 9


Basics of Digital Computer Unit-3

Binary System:
Solution:
b)

3576 Introduction to Computer Concepts 10


Basics of Digital Computer Unit-3

Octal System:
 Consists of 8 digits or symbols i.e. from 07
 It base is 8 these numbers are represented
with base 8 like (765)8
 Octal, like an octopus' eight legs, means eight and
therefore there are eight numbers to use from zero to
seven.
 The column weights are 1, 8, 64, 512, etc. The weights
are derived by taking the base number to the power of
the column, 80=1, 81=8, 82=64, 83=512, etc.
 Now we can do the same exercise as in the last
chapter to convert an octal number to decimal.

3576 Introduction to Computer Concepts 11


Basics of Digital Computer Unit-3

Octal to decimal

3576 Introduction to Computer Concepts 12


Basics of Digital Computer Unit-3

Decimal to Octal

3576 Introduction to Computer Concepts 13


Basics of Digital Computer Unit-3

Hexadecimal System:
 This numbering system consists of 16 digits
i.e. 015
 This system is introduced for representing
large numbers.
 This number system is used for memory
address representation.
 Where octal used 3 bits the hexadecimal
system used 4 bits to represent one number.

3576 Introduction to Computer Concepts 14


Basics of Digital Computer Unit-3

Hexadecimal to Decimal

3576 Introduction to Computer Concepts 15


Basics of Digital Computer Unit-3

Decimal to Hexadecimal

3576 Introduction to Computer Concepts 16


Basics of Digital Computer Unit-3

Conversion Rules:
2 50
 Decimal to Binary:
2 25-0
 (50)10 (?)2---(110010)2
2 12-1
2 6-0
2 3-0
1-1
 Decimal to Octal:
8 50
 (50)10  (?)8 ---(62)8
6-2

 Decimal to Hexadecimal: 16 50
 (50)10  (?)16 ---(32)16
3-2
3576 Introduction to Computer Concepts 17
Basics of Digital Computer Unit-3
Truth Table
Logic Gates: Symbolical Representation

1. OR Gate:
2. AND Gate:
3. Not Gate:
4. NAND Gate:
5. NOR Gate:
6. XOR Gate:
7. XNOR Gate:
3576 Introduction to Computer Concepts 18
Basics of Digital Computer Unit-3
Boolean Algebra:
 To reduce logical expressions is the
mathematics of logical expressions,
introduced by George Boole in 1854 and
known today as Boolean Algebra.
 The rules of Boolean Algebra are simple
and straight-forward.
 Can be applied to any logical expression.
 The resulting reduced expression can then
be readily tested with a Truth Table, to verify
that the reduction was valid.

3576 Introduction to Computer Concepts 19


Basics of Digital Computer Unit-3
The rules of Boolean Algebra are:. Associative Law
AND Operations (·) (A·B)·C = A·(B·C) = A·B·C
0·0 = 0 A·0 = 0 (A+B)+C = A+(B+C) = A+B+C
1·0 = 0 A·1 = A
Distributive Law
0·1 = 0 A·A = A
A·(B+C) = (A·B) + (A·C)
1·1 = 1 A·A' = 0
A+(B·C) = (A+B) · (A+C)
OR Operations (+)
0+0 = 0 A+0 = A Commutative Law
1+0 = 1 A+1 = 1 A·B = B·A

0+1 = 1 A+A = A A+B = B+A


1+1 = 1 A+A' = 1 Precedence
NOT Operations (') AB = A·B
0' = 1 A'' = A A·B+C = (A·B) + C
1' = 0
A+B·C = A + (B·C)

3576 Introduction to Computer Concepts 20


Basics of Digital Computer Unit-3

Logical Operations:
 Addition (OR):
 Multiplication (AND):
 Complement (NOT):

3576 Introduction to Computer Concepts 21


Basics of Digital Computer Unit-3

3576 Introduction to Computer Concepts 22


Basics of Digital Computer Unit-3

Precedence of Logical Operation:


 Left to Right:

 Parenthesis first ():

 NOT and AND operations:

 OR operations:

3576 Introduction to Computer Concepts 23


Basics of Digital Computer Unit-3

Truth Table:
 A truth table shows how a logic circuit's output
responds to various combinations of the inputs,
using logic 1 for true and logic 0 for false.
 All permutations of the inputs are listed on the
left, and the output of the circuit is listed on the
right.
 The desired output can be achieved by a
combination of logic gates.
 A truth table for two inputs is on next slide, but it
can be extended to any number of inputs.
 The input columns are usually constructed in the
order of binary counting with a number of bits
equal to the number of inputs.

3576 Introduction to Computer Concepts 24


Basics of Digital Computer Unit-3
 A truth table is a mathematical table used in
logic
 Specifically in connection with Boolean
algebra, Boolean functions, and propositional
calculus
 To compute the functional values of logical
expressions on each of their functional
arguments

3576 Introduction to Computer Concepts 25


3576 Introduction to Computer Concepts 26

You might also like