Machineboy空
[From Nand to Tetris] 모듈 2.Boolean Arithmetic and the ALU 본문
project 1에서 만든 chipset을 가지고 Adder를 만들 것이고, 다음으로는 ALU(Arithmetic Logic Unit)을 만들것이다.그리고 그걸로 CPU(Central Processing Unit)을 만들 것이다.
- Adder : chips designed to add numbers
- ALU(Arithmetic Logic Unit) : designed to perform whole set of arithmetic and logical operations, computer's calculating brain
- CPU(Central Processing Unit) : ALU as the counterpiece chip
Key Concept
- binary numbers
- binary addition
- two's complement method
- half-adders
- full-adders
- n-bit adders
- counter
- ALU
- combinational logic
2.1 Binary Numbers
how to represent integer numbers within binary system
10진법 <-> 2진법
2.2 Binary Addition
2.3 Negative Numbers
음수 만드는 방법 1: Sign bit
Sign bit를 활용해서 음수를 만들었을 때 생기는 문제점
0 과 -0은 같다!
음수 만드는 방법 2: 2's Complement
2.4 Arithmetic Logic Unit
ALU
- very important component of every general purpose computer
Von Neumann Architecture 폰 노이만 구조
- 1945년에 발표한 학술지 내용 중 일부, diagram or a description of how general purpose computers can be built
- key player in the diagram : CPU(central processing unit) 안에, another important piece the ALU(Arithmetic Logic Unit)
- ALU가 할 수 있는 일 : integer addition, integer multiplication, integer division 등
- ALU, 하드웨어가 얼만큼의 기능을 수행하는 것이 좋을까?
- classical hardware software trade off : choose not to implement something in hardware, you can always augument it later with software
- 예. ALU가 곱셈과 나눗셈 기능을 하지 않으면, 나중에 그 연산이 가능한 소프트웨어를 얹어야 한다.
The Hack ALU
one specific example of an ALU
https://terms.naver.com/entry.naver?docId=3409528&cid=60335&categoryId=60335
폰 노이만과 프로그램 내장방식
현대 컴퓨터의 모델을 제시한 사람, 게임이론을 창시한 사람, 인공생명체의 가능성을 연구한 사람, 원자폭탄을 만드는데 참여한 사람. 이 모든 일과 관계된 사람이 있다면 믿겠는가?그 주인공이
terms.naver.com
2.5 Project 2 Overview
2.6 Perspectives
- in general, when you build a computer system the overall functionality that the system provides is divided between the hardware and the operating system that runs on top of it. So, it is the designers freedom to decide how much functionality to put in each one of these layers.
- ALU will be extremely simple, and that operations like division and multiplication will be delegated to the software that runs on top of this computer
- operating system will have several libraries and one of these libraries is gone, is going to be called math. And the math library will feature all sorts of very useful mathmatical operations including multiplication and division
- it is a matter of tradeoff, cost effectiveness