Language Study/C

[C/C++] 컴퓨터 시스템과 프로그램의 이해

지미닝 2022. 10. 1. 15:27

Index


  1. Univalsal Computing Device and Turing Machine
  2. 컴퓨터 시스템: H/W + S/W
  3. Sequence of Instructions (명령어 순차 조합)
  4. 컴퓨터를 활용한 문제 해결: Transformations between layers of abstraction
  5. Algorithms의 속성

1.  Univalsal Computing Device and Turing Machine

Introduction to the World of Computing

Computer is Electronic idiot. => It does exactly what we tell it to, nothing more.

The components of a computer system: Hardware, Software

 

Computer is a Universal Computing Device!

  • 하나의 특정 computation 에만 능한 것이 아니라 any computation도 가능하다.
  • Universal Computational deivde는 Alan Turing에서 온 것이다.

Turning Machine

ㄴMathematcial model of a device that can perform any computation

 

  • Proposed by Alan Turing in 1937
  • Every computation can be performed by some Turing machine.

Black Box Model

It provides no information as to exactly how to operation is performed.


Universal Turning Machine

  • A machine that can simulate all Turning machines (This is also a Turning machine)
  • Input: data + a description of computation
  • Universal Tuing Machine is Programable.
  • A computer is a universal computing device.


2. Computer system

컴퓨터 시스템은 사용자 요구에 따른 임의의 다양한 계산을 수행할 수 있는 장치로 개발되었다.

컴퓨터 시스템
H/W S/W
컴퓨터 H/W로 수행할 수 있는 계산은 명령어(Instruction)라 불리는 한정된 기초 연산에 불과하다. 명령어를 조합하여 순차적으로 실행하면 사용자가 요구하는 임의의 다야한 계산을 실현할 수 있다.
H/W만으로는 사용자가 요구하는 임의의 다양한 계산을 수행할 수 없다. 컴퓨터 시스템에서 S/W란 특정 계산을 위해 수행하는 명령어 조합과 관련 데이터 모음이다.

3. Sequence of Instructions

Operator and Instruction

  • Operation(연산) : Operator(연ㅁ산자)와 Operand(피연산자)로 구성

  • Instruction(명령어) : Opcode(명령코드)와 Operand(피연산자)로 구성


4. Transformations between layers of abstraction

How do we get the electrons to do the work?

A systematic sequence of Transformations between layers of abstraction.


5. Properties of an Algorithm

  • An algorithm is a step-by-step procedure thatn is guaranteed to terminate, such that each step is precisely stated and can be carried out by the computer.
  • Definiteness:
    • Each step must be precisely defined
  • Effective Computability:
    • All operations to be performed must be sufficiently basic that they can be done exactly and in finite length
  • Finiteness:
    • The algorithm must always terminate after a finite number of steps

Cf. ISA(Instruction Set Architecture)

  • CPU가 직접 해독하고 실행할 수 있는 명령어 0과 1의 이진 값으로 표현되는 기게어 명령어
  • CPU가 직접 해동하고 실행할 수 있는 기계 명령어들의 집합 그리고 그 기반 구조 및 체계
  • ISA분류
    • 구조적 특성에 따라 CISC, RISC등으로 분류
    • CISC -> Intel의 x86 Architecture
    • RISC -> ARM의 ARM Architecture