Sie sind auf Seite 1von 32

UNIVERSITY OF COLOMBO SCHOOL OF COMPUTING

IT2101 Computer Architecture & Operating Systems


DEGREE OF BACHELOR OF INFORMATION TECHNOLOGY

Major Topics
1. Review of Basic Principles 2. General Systems Architecture 3. Instruction Set Architecture 4. Basic CPU Architecture 5. Memory Hierarchy & I/O Techniques 6. Parallelism 7. Introduction to Operating Systems 8 Processes & Process Management 9. Memory Management 10. File Systems 11 Unix System & Windows NT Overview 07 04 05 04 06 04 04 08 06 06 06

Total Lectures

60

Review of Basic Principles (7hrs.)


Radix number systems Decimal, Binary, and Hexadecimal number systems Binary arithmetic: addition, complements, and subtraction Binary Codes BCD code ASCII character code Boolean algebra and Logic Gates: Boolean functions Logic Gates: AND, OR, NOT, NOR, NAND, XOR Simplification of Boolean functions:(2,3, and 4 variable Karnaugh maps)

Review of Basic Principles


Digital Computer
A digital system performing computational tasks. Represents information using variables that take a limited number of discrete values. Processes these values internally Uses two basic values to represent information

Radix Number Systems


Each number system has a number of different digits which is called the radix or the base of the number system.

Decimal Binary Octal Hexadecimal (Hex)

Base Base Base Base

= = = =

10 2 8 16

Decimal Number System


Base (Radix) Digits e.g.
1000

10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 747510
100 10 1

The magnitude represented by a digit is decided by the position of the digit within the number.

For example the digit 7 in the left-most position of 7475 counts for 7000 and the digit 7 in the second position from the right counts for 70.

Binary Number System


Base (Radix) Digits e.g.
1

2 0, 1 11102
1 1 0

8=23 4=22 2=21 1=20

The digit 1 in the third position from the right represents the value 4 and the digit 1 in the fourth position from the right represents the value 8.

Octal Number System


Base (Radix) Digits e.g.
512=83

8 0, 1, 2, 3, 4, 5, 6, 7 16238
64=82 8=81

1=80

The digit 2 in the second position from the right represents the value 16 and the digit 1 in the fourth position from the right represents the value 512.

Hexadecimal Number System


Base (Radix) Digits e.g.
2

16 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F 2F4D 16
16=161 1=160

4096=163 256=162

The digit F in the third position from the right represents the value 3840 and the digit D in the first position from the right represents the value 1.

Binary Arithmetic
Addition

Complements

Subtraction

Binary Addition
(a)

0 +0 0 1 +0 1

(b)

0 +1 1
(d)

(c)

1 +1 10

Carry Bit

Binary Addition Examples


(a)

1011 + 1100 10111


101 + 1001 1110

(b)

1010 + 100 1110


(e)

(c)

1011 + 101 10000

(d)

10011001 + 101100 11000101

1 0

Binary Complement (1s Complement) Operation

0 1

Example

110010110 001101001

Twos Complement
The Twos complement of a binary number is obtained by first complementing the number and then adding 1 to the result.

1001110

0110001 + 1
0110010

Ones Complement

Twos Complement

Binary Subtraction
Binary subtraction is implemented by adding the Twos complement of the number to be subtracted. Twos Example 1101 -1001 1101 +0111 10100

complement of 1001

If there is a carry then it is ignored. Thus, the answer is 0100.

Binary Codes
A binary code is a group of n bits that assume up to 2n distinct combinations of 1s and 0s with each combination representing one element of the set that is being coded.
BCD

Binary Coded Decimal

ASCII American Standard Code for Information Interchange

BCD Binary Coded Decimal


When the decimal numbers are represented in BCD, each decimal digit is represented by the equivalent BCD code.
Example :BCD Representation of Decimal 6349 Decimal Number 0 1 2 3 4 5 6 7 8 9 BCD Number 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001

0110 0011 0100 1001

ASCII
Number ASCII 0 1 2 3 4 5 6 7 8 9 0110000 0110001 0110010 0110011 0110100 0110101 0110110 0110111 0111000 0111001 Letter A B C D E F G H I ASCII 1000001 1000010 1000011 1000100 1000101 1000110 1000111 1001000 1001001

ASCII

Continued.

Letter ASCII J 1001010 K 1001011 L 1001100 M 1001101 N 1001110 O 1001111 P 1010000 Q 1010001 R 1010010

Letter ASCII S 1010011 T 1010100 U 1010101 V 1010110 W 1010111 X 1011000 Y 1011001 Z 1011010

Logic Gates

Binary information is represented in digital computers by physical quantities called signals.


Two different electrical voltage levels such as 3 volts and 0.5 volts may be used to represent binary 1 and 0. Binary logic deals with binary variables and with operations that assume a logical meaning.

Logic Gates Contd


A particular logic operation can be described in an algebraic or tabular form.
The manipulation of binary information is done by the circuits called logic gates which are blocks of hardware that produce signals of binary 1 or 0 when input logic requirements are satisfied.

Logic Gates Contd


Each gate has a distinct graphics symbol and its operation can be described by means of an algebraic expression or in a form of a table called the truth table. Each gate has one or more binary inputs and one binary output.

Logic Gates
AND OR NOT (Inverter) NAND (Not AND) NOR (Not OR) XOR (Exclusive-OR) Exclusive-NOR

Logic Gates
A B

Cont.

AND Logic Gate


x

Truth Table AB 0 0 0 1 1 0 1 1 x 0 0 0 1

x=A.B

A, B Binary Input Variables x Binary Output Variable

Logic Gates
OR
A B

Cont.

Logic Gate Table


x

Truth

x=A+B

AB 0 0 0 1 1 0 1 1

x 0 1 1 1

This is read as x equals A or B.

Logic Gates
NOT Logic Gate
A

Cont.

Truth Table
x

A x 0 1 1 0

x=A

Logic Gates
NAND
A B

Cont.

Logic Gate
x

Truth Table AB 0 0 0 1 1 0 1 1 x 1 1 1 0

x=A.B

Logic Gates
NOR Logic Gate
A B

Cont.

Truth Table
x

x=A+B

AB 0 0 0 1 1 0 1 1

x 1 0 0 0

Logic Gates
XOR Logic Gate
A B

Cont.

Truth Table
x

x=A+B

AB 0 0 0 1 1 0 1 1

x 0 1 1 0

Logic Gates

Cont.

Exclusive-NOR Logic Gate


A x

Truth Table AB 0 0 0 1 1 0 1 1 x 1 0 0 1

x=A+B

Contact External Degree Unit (EDU) of the


University of Colombo School of Computing
No. 221/2A, Dharmapala Mawatha, Colombo 7.
Phone : 074-720511 Fax : 074-720512

http://www.bit. lk

Thank you

Das könnte Ihnen auch gefallen