computer system PEOPLEWARE HARDWARE SOFTWARE PEOPLEWARE User Data

  • Slides: 60
Download presentation

�������� (computer system( • PEOPLEWARE • HARDWARE • SOFTWARE

�������� (computer system( • PEOPLEWARE • HARDWARE • SOFTWARE

PEOPLEWARE • • User Data Entry Operator Computer Operator Programmer (Application Programmer, System Programmer)

PEOPLEWARE • • User Data Entry Operator Computer Operator Programmer (Application Programmer, System Programmer) • System Analyst • Administrator (System, Network, Database) • EDP Manager

HARDWARE CPU Control Unit Arithmetic/logic Unit Input device Memory Output device

HARDWARE CPU Control Unit Arithmetic/logic Unit Input device Memory Output device

INPUT DEVICE ���� keyboard, mouse, disk drive, tape drive, microphone, joystick

INPUT DEVICE ���� keyboard, mouse, disk drive, tape drive, microphone, joystick

OUTPUT DEVICE ����� , printer, disk drive, tape drive, plotter, speaker

OUTPUT DEVICE ����� , printer, disk drive, tape drive, plotter, speaker

address MEMORY 0 1 2 bit = binary digit byte = 8 bits 1

address MEMORY 0 1 2 bit = binary digit byte = 8 bits 1 K = 210 bytes 1 M = 220 bytes 1 G = 230 bytes ���� s= 2 s -1 RAM (Random Access Memory) ROM (Read-Only Memory) ����� bit ����� address ���� s= 3 ���� address 0 -

SOFTWARE • System Software - System Management Programs: Operating Systems - System Development Programs:

SOFTWARE • System Software - System Management Programs: Operating Systems - System Development Programs: Compiler, Interpreter, Editor - System Support Programs: utility, performance monitor, security monitor • Application Software - General-purpose Programs: e. g. word processing, spreadsheet - Application-Specific Programs: e. g. airline reservation, banking

COMPUTER LANGUAGE • Low-level Language - Machine language - Assembly Language • High-level Language

COMPUTER LANGUAGE • Low-level Language - Machine language - Assembly Language • High-level Language e. g. C, Pascal, FORTRAN

ASSEMBLER source program assembly language assembler object program machine language COMPILE TIME

ASSEMBLER source program assembly language assembler object program machine language COMPILE TIME

COMPILER source program high-level language compiler object program machine language COMPILE TIME

COMPILER source program high-level language compiler object program machine language COMPILE TIME

RUN TIME input data machine language output

RUN TIME input data machine language output

INTERPRETER source program input data interpreter COMPILE and RUN TIME output

INTERPRETER source program input data interpreter COMPILE and RUN TIME output

������� C #include <stdio. h> main() { int i, j; scanf(“%d”, &i); j=2*i+5/10 -3;

������� C #include <stdio. h> main() { int i, j; scanf(“%d”, &i); j=2*i+5/10 -3; printf(“%d %dn”, i, j); }

�������� assembly. 386. data i dd ? j dd ? . code mov i,

�������� assembly. 386. data i dd ? j dd ? . code mov i, 10 mov ax, i add ax, 5 mov j, ax end

MACHINE LANGUAGE • DATA • INSTRUCTION

MACHINE LANGUAGE • DATA • INSTRUCTION

DATA REPRESENTATION • • CHARACTER INTEGER FLOATING POINT Binary Code Decimal (BCD(

DATA REPRESENTATION • • CHARACTER INTEGER FLOATING POINT Binary Code Decimal (BCD(

INTEGER • UNSIGNED INTEGER • SIGNED INTEGER

INTEGER • UNSIGNED INTEGER • SIGNED INTEGER

n=1 binary decimal 0 0 1 1

n=1 binary decimal 0 0 1 1

n=2 binary 00 01 10 11 decimal 0 1 2 3

n=2 binary 00 01 10 11 decimal 0 1 2 3

n=3 binary 000 001 010 011 100 101 110 111 decimal 0 1 2

n=3 binary 000 001 010 011 100 101 110 111 decimal 0 1 2 3 4 5 6 7

SIGNED INTEGER • SIGNED MAGNITUDE • ONE COMPLEMENT • TWO COMPLEMENT

SIGNED INTEGER • SIGNED MAGNITUDE • ONE COMPLEMENT • TWO COMPLEMENT

n=2 binary 00 01 10 11 decimal +0 +1 -0 -1

n=2 binary 00 01 10 11 decimal +0 +1 -0 -1

n=3 binary 000 001 010 011 100 101 110 111 decimal +0 +1 +2

n=3 binary 000 001 010 011 100 101 110 111 decimal +0 +1 +2 +3 -0 -1 -2 -3

n=2 binary 00 01 10 11 decimal +0 +1 -1 -0

n=2 binary 00 01 10 11 decimal +0 +1 -1 -0

n=3 binary 000 001 010 011 100 101 110 111 decimal +0 +1 +2

n=3 binary 000 001 010 011 100 101 110 111 decimal +0 +1 +2 +3 -3 -2 -1 -0

n=2 binary 00 01 10 11 decimal +0 +1 -2 -1

n=2 binary 00 01 10 11 decimal +0 +1 -2 -1

n=3 binary 000 001 010 011 100 101 110 111 decimal +0 +1 +2

n=3 binary 000 001 010 011 100 101 110 111 decimal +0 +1 +2 +3 -4 -3 -2 -1

���� 10(0. 00173)������ 0. 000173 x 101 , 0. 001730 x 100, 0. 017300

���� 10(0. 00173)������ 0. 000173 x 101 , 0. 001730 x 100, 0. 017300 x 10 -1, ���� 0. 173000 x 10 -2 ��������� normalized 10(103. 5)�������

IEEE standard

IEEE standard

IEEE standard

IEEE standard

IEEE standard

IEEE standard

����� biased exponent mantissa all 0 nonzero all 1 all 0 all 1 nonzero

����� biased exponent mantissa all 0 nonzero all 1 all 0 all 1 nonzero special meaning floating point zero denormalized infinity Na. N (Not a Number)

���� decimal 10. 0 ���� binary ��� IEEE standard, short real ������ 0000 0100

���� decimal 10. 0 ���� binary ��� IEEE standard, short real ������ 0000 0100 0001 1000 0000

Binary Code Decimal (BCD( • Packed BCD • Unpacked BCD

Binary Code Decimal (BCD( • Packed BCD • Unpacked BCD

BCD ��� binary 4 ��� decimal ������� BCD 0000 0001 0010 0011 0100 0101

BCD ��� binary 4 ��� decimal ������� BCD 0000 0001 0010 0011 0100 0101 0110 0111 1000 decimal 0 1 2 3 4 5 6 7 8

Unpacked BCD �������� ��� 0000 �������� BCD ���� decimal 1234 ������ Unpacked BCD ������

Unpacked BCD �������� ��� 0000 �������� BCD ���� decimal 1234 ������ Unpacked BCD ������ 0000 0001 0000 0010 0000 0011 0000 0100

���� data representation data character integer floating point BCD ASCII unsigned packed EBCDIC signed

���� data representation data character integer floating point BCD ASCII unsigned packed EBCDIC signed unpacked signed magnitude UNICODE one complement two complement

���� if (A = = B) then A=A+1; else B=B-1 ����������� CMPA, B JEQ

���� if (A = = B) then A=A+1; else B=B-1 ����������� CMPA, B JEQ L 1 SUB B, 1 JMP L 3 L 1: ADD A, 1 L 3:

���� SUM=0; FOR I=1 TO 100 DO SUM=SUM+I; ������������ MOV SUM, 0 MOV I,

���� SUM=0; FOR I=1 TO 100 DO SUM=SUM+I; ������������ MOV SUM, 0 MOV I, 1 L 1: CMP I, 100 JGT L 2 ADD SUM, I ADD I, 1 JMP L 1 L 2: