CPU
-
혼자 공부하는 컴퓨터구조 + 운영체제 - 컴퓨터 4대 핵심 부품책책책 책을 읽읍시다/프로그래밍 2023. 1. 16. 00:01
04 CPU의 작동 원리 ALU ALU는 계산하기 위한 부품이다. 계산하기 위해서는 피현산자와 수행할 연산이 필요하다. 그래서 ALU는 레지스터를 통해 피연산자를 받아들이고, 제어장치로부터 수행할 연산을 알려주는 제어 신호를 받아들인다. ALU는 레지스터와 제어장치로부터 받아들인 피연산자와 제어 신호로 산술 연산, 논리 연산 등 다양한 연산을 수행한다. 연산을 수행한 결과는 특정 숫자나 문자가 될 수도 있고, 메모리 주소가 될 수도 있다. 그리고 이 결과값은 바로 메모리에 저장되지 않고 일시적으로 레지스터에 저장된다. CPU가 메모리에 접근하는 속도는 레지스터에 접근하는 속도보다 훨씬 느리다. ALU가 연산할 때마다 결과를 메모리에 저장한다면 당연하게도 CPU는 메모리에 자주 접근하게 되고, 이는 CPU..