micro- computing system hardware system software system monitor program, bios operating system: dos,...

Post on 01-Jan-2016

213 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Micro-computing system

Hardware system

Software system

Monitor program, BIOS

Operating system: DOS, Windows, UNIX, Linux

Language processing program

Assembler

Interpreter

CompilerService program

Machine language

Assembly language

High-level language

Object-oriented language

Systemsoftware

Program design language

Application software

Middleware

Micro-computer main board

CPU

Internal memory

I/O interface circuit

System busBattery,chassis

peripherals

Chapter 0

Introductionto Computing

0.1 Numbering and Coding System

0.1 Numbering and Coding System

0.1 Numbering and Coding System

Binary Numbers

Each digit (bit) is either 1 or 0 Each bit represents a power of 2

MSB – most significant bit LSB – least significant bit

0.1 Numbering and Coding System

Binary Addition

Starting with the LSB, add each pair of digits, include the carry if present.

0.1 Numbering and Coding System

Hexadecimal Addition Divide the sum of two digits by the number base (16). The quotient

becomes the carry value, and the remainder is the sum digit.

36 28 28 6A42 45 58 4B78 6D 80 B5

11

21 / 16 = 1, rem 5

0.1 Numbering and Coding System

Hexadecimal Subtraction

When a borrow is required from the digit to the left, add 16 (decimal) to the current digit's value:

C6 75A2 4724 2E

-1

16 + 5 = 21

0.1 Numbering and Coding System

Translating Binary to Decimal

Weighted positional notation shows how to calculate the decimal value of each binary bit:

dec = (Dn-1 2n-1) + (Dn-2 2n-2) + ... + (D1 21) + (D0 20)

D = binary digit

binary 00001001 = decimal 9:

(1 23) + (1 20) = 9

0.1 Numbering and Coding System

Translating Unsigned Decimal to Binary

Repeatedly divide the decimal integer by 2. Each remainder is a binary digit in the translated value:

37 = 100101

0.1 Numbering and Coding System

Translating Binary to Hexadecimal

• Each hexadecimal digit corresponds to 4 binary bits.

• Example: Translate the binary integer 000101101010011110010100 to hexadecimal:

Binary 000101101010011110010100 (2) equals hex 16A794 (16)

0.1 Numbering and Coding System

Converting Hexadecimal to Decimal

Multiply each digit by its corresponding power of 16:

dec = (D3 163) + (D2 162) + (D1 161) + (D0 160)

Hex 1234(16) equals (1 163) + (2 162) + (3 161) + (4 160), or

decimal 4,660 (10)

Hex 3BA4 (16) equals (3 163) + (11 * 162) + (10 161) + (4 160),

or decimal 15,268 (10)

0.1 Numbering and Coding System

Converting Decimal to Hexadecimal

decimal 422 (10) = 1A6 (16) hexadecimal

0.1 Numbering and Coding System

Signed Integers

The highest bit indicates the sign. 1 = negative, 0 = positive

0.1 Numbering and Coding System

Forming the Two's Complement

Negative numbers are stored in two's complement notation

0.1 Numbering and Coding System

Convert signed binary to decimal

Starting value 11110000(2)

Step 1: Reverse the bits 00001111

Step 2: Add 1 to the value from step 1 00001111

+ 1

Step 3: Form the two’s complement 00010000

Step 4: Covert to decimal and attach sign -16(10)

0.1 Numbering and Coding System

Convert signed decimal to binary

Starting value -16(10)

Step 1: Convert the absolute value into binary 00010000(2)

Step 2: Reverse the bits 11101111(2)

Step 3: Form the two’s complement 11110000(2)

0.1 Numbering and Coding System

Convert signed decimal to hexadecimal

Starting value -43(10)

Step 1: Convert the absolute value into hexadecimal 2B(16)

Step 2: Form the two’s complement D5(16)

0.1 Numbering and Coding System

Convert signed hexadecimal to decimal

Starting value D5(16)

Step 1: Form the two’s complement 2B(16)

Step 4: Covert to decimal and attach sign - 43(10)

0.1 Numbering and Coding System

ASCII code

Standard ASCII (0 – 127)Extended ASCII (0 – 255)

A: 41Ha: 61H B: 42H

b: 62H

0: 30H1: 31H

0.2 Digital Primer

Logic gatesAND

Digital gate diagram for AND

OR

Digital gate diagram for OR

NOT

Digital gate diagram for NOT

ANDORNOT (Inverter)XORNANDNORTri-state buffer

0.2 Digital Primer

Logic gates

0.2 Digital Primer

Logic gates

0.2 Digital Primer

Logic gates

NMOS AND gate AND gate using diodes

0.3 Inside the Computer

Some important terminology

byte word

0.3 Inside the Computer

Some important terminology

byte word

0.3 Inside the Computer

Internal organization of computers

Arithmetic unit

Memory storage unit

Control unit

Input Device Output Device

Basic architecture of computer

Instruction 1Instruction 2Instruction 3

Instruction n

data 21data 12data 117data 13

program

data

Intermediate resultsFinal results

contentaddress

No.1

No.2

The storage of program and data

0.3 Inside the Computer

Internal working of computers

Homework

P18: 4, 6 P19: 15

top related