lecture4 binary-numbers-logic-operations
Post on 15-Jul-2015
373 Views
Preview:
TRANSCRIPT
During that lecture we learnt about the various types of computers with respect to their size, capability, applications (FIVE TYPES)
And its five essential components and various subsystem
Bus interface unit
Port
Modem
1. To become familiar with number system used by the microprocessors - binary numbers
2. To become able to perform decimal-to-binaryconversions
3. To understand the NOT, AND, OR and XOR logic operations – the fundamental operations that are available in all microprocessors
Octal
base = 8
8 symbols (0,1,2,3,4,5,6,7)
Hexadecimal
base = 16
16 symbols (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)
4202 = 2x100 + 0x101 + 2x102 + 4x103
The right-most is the least significant digit
The left-most is the most significant digit
10011= 1x20 + 1x21 + 0x22 + 0x23 + 1x24
The right-most is the least significant digit
The left-most is the most significant digit
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.
.
.
0
1
10
11
100
101
110
111
1000
1001
1010
1011
1100
1101
1110
1111
10000
10001
10010
10011
10100
10101
10110
10111
11000
11001
11010
11011
11100
11101
11110
11111
100000
100001
100010
100011
100100
.
.
.
Counting
in Binary
?Because this system is natural for digital computers
The fundamental building block of a digital computer –
the switch – possesses two natural states, ON & OFF.
It is natural to represent those states in a number
system that has only two symbols, 1 and 0, i.e. the
binary number system
In some ways, the decimal number system is natural
to us humans. Why?
1 Kilobyte = 1,024 bytes 1 Megabyte = 1, 024 KB = 1, 048, 576 bytes 1 Gigabyte = 1,024 MB = 1, 048, 576 KB
= 1, 073, 741, 824 bytes.
264833
2640
4108
Check if the last quotient
(MSD) is still divisible by 8.
If not consider the MSD as
the leftmost value then
append the remainder(start
with the last remainder).
1st quotient
3384
321 2nd remainder
2nd quotient
1st remainder
That finishes our first topic - introduction to binary numbers and their conversion to and from decimal, hexadecimal and octal numbers.
Our next topic is …
Name Example Symbolically
NOT y = NOT(x) x´
AND z = x AND y x · y
OR z = x OR y x + y
XOR z = x XOR y x y
x y w y · x z = (y · x) w0 0 0 0 0
0 0 1 0 1
0 1 0 0 0
0 1 1 0 1
1 0 0 0 0
1 0 1 0 1
1 1 0 1 1
1 1 1 1 0
A. Convert the following into base 2, 8 and H:
i. The last five digits of your cellphone number
ii. 256
B. x, y & z are Boolean variables. Determine the truth tables for the following combinations:
i. (x · y) + y
ii. (x y)´ + w
Whole sheet of yellow paper. Deadline: July 12 (Monday 12nn).Show your solution.
1. About the binary number system, and how it differsfrom the decimal system
2. Positional notation for representing binary and decimal numbers
3. A process (or algorithm) which can be used to convertdecimal numbers to binary numbers
4. Basic logic operations for Boolean variables, i.e. NOT, OR, AND, XOR, NOR, NAND, XNOR
5. Construction of truth tables (How many rows?)
top related