Computer

    [CE] Ex : 2's complement

    다음 문제들은 8bit 의 binary로 2's complement사용한 예제들이다. 1 $$ 26-15 = 26 + (-15) = 0001 1010_2 + 1111 0001_2 = 10000 1011_2 $$ 10000 1011에서 MSB의 carryout을 버리면 0000 1011이 된다. 이는 $8+2+1=11$ 에 해당함. 2 $$ -31-6 = (-31) + (-6) = 1110 0001_2 + 1111 1010_2 = 11101 1011_2 $$ 11101 1011에서 MSB의 carryout을 버리면 1101 1011이 된다. 이는 $-37$ 에 해당함. 3 $$ 144 – 156 = 144 + (-156) = 1001 0000_2 + 0110 0100_2 = 1111 0100_2 $$ 11..

    [CE] Computer and Program.

    개인적으로 선호하는 Computer의 정의는 다음과 같음 (wikipedia). A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These programs enable computers to perform a wide range of tasks. 컴퓨터는 어떤 task를 수행하기 위한 program (=set of instructions)을 수행시킬..