본문 바로가기

전체 글

컴퓨터 구조 4 #Arithmetic for Computers - ALU -operands on Integers 컴퓨터 하드웨어의 한계로 overflow가 나오면 무시된다. (ex> 두 64bit의 수를 더했을 때, 결과는 64 bit 고정) Integer의 ADD와 SUB 계산시, overflow가 나올 수 있는 condition A B Result A + B + + - A + B - - + A - B (negation을 이용하여 계산) + - - A - B (negation을 이용하여 계산) - + + ADD의 두 integer가 다른 부호를 지니면거나, SUB의 두 integer가 같은 부호를 지니면 overflow는 발생하지 않는다. -> overflow는 carry-in의 MSB와 carry-out의 MSB가 .. 더보기
컴퓨터 구조 3 #Basic of Logic Design Logic Gate -AND -OR -NOT -NAND (not AND) -NOR (not OR) -XOR : 같을 때만 1, 다르면 0 *gate들을 조합해서 새로운 gate를 만들 수 있다. -Multiplexor (Selector) -Equivalences(Boolean Equation) -Karnaugh Maps (K-map)(sw optimizer) minterm을 합해서 적을 때 k-map을 이용하면 더 간소화할 수 있다. 이때, ab의 순서가 반드시 00, 01, 11, 10 이 되어야 한다! output이 1이 겹치는 부분이 있다면 그 그룹을 더하고 마지막에 겹치는 부분을 더하면 된다. ex> #One-bit and four-bit adders -H.. 더보기
컴퓨터 구조 2 #Instructions -Signed and Unsigned Numbers 32-bit representation unsigned( only + ) : 범위는 0 to 4,294,967,295 signed(+/-) : 범위는 : –2 31 to +2 31 – 1 -> signed negation을 이용해서 뺄셈을 할 수있다. -> bit flipping을 하고 1을 더한다. (2의 보수법) ex> +2 : 0010 ->(bit flip)-> 1101 ->(+1)-> 1110 :-2 *Ā + 1 = -A* MSB가 1이면 negative, 0이면 non-negative (sign 일때) -Instruction Set Architecture ISA(Instrction set Architectuer) : c.. 더보기
컴퓨터 구조 1 #Computer Abtractions and Tecnology -computer system [ Application Software [ system Software [ Hardware ] ] ] -5 components of a computer : input, output, memory, datapath, control -CPU(Central Processing Unit) responsible for handing Main part of CPU: datapath, control, register -Memory CPU is very fst, so it needs quik and large memories Hard disk is cheap but slow, RAM is fast but expensive .. 더보기
CG4 Sierpinski Gasket - Fractal 삼각형의 안이 삼각형으로 반복적으로 분리되는형태(fractual object-continue subdividing) 이러한 fractual object는 재귀함수를 이용하여 만들 수 있다. 6. 2D Gasket 만들기 삼각형을 그려주는 triangle 함수를 삼각형을 나누는 divideTriangle함수 안에 재귀적으로 사용한다. gasket2.js var canvas; var gl; var points = []; var NumTimesToSubdivide = 2; //number of subdivision window.onload = function init() { // // Initialize our data for the Sierpinski Gas.. 더보기
CG3 webGL Qualifiers -Attribute(각 버택스마다 데이터가 담기는 변수) vertex 마다 한번 바뀔 수 있다. (버택스마다 다시 불러오기 때문) gl_Position과 같은 built-in variable이 존재하지만 gl_Position 이외에는 대부분 더 이상 사용되지 않는다. ex> attribute vec4 vPosition;/ attribute vec4 vColor; gl_Position - vPosition ; java 파일에서 getAttributeLocation( program, "변수명") 의 명령어로 불러와서 buffer의 값을 넣는다. ex> getAttributeLocation, vertexAttributePointer, enableVertexAttributeArra.. 더보기
CG2 WebGL web br-> js- webGL vertec processor-> Clipper and primitive assembler -> Rasterizer(3차원->2차원(viewport transform)) -> Fragment processor -> Pixels *fragment에서 빈 공간을 fragment라고 한다. WebGL 실습 common-항상써야하는 라이브러리 Common files: -webgl-utils.js: standard utilities from google to set up a webgl context: webGL과 관련된 모든 API -MV.js: our matrix/vector package. Documentation on website: matrix/vertor의 연.. 더보기
CG1 Basic CG System -Input Devices: Mouse & trackball, Light pen, Data tablet, Joystick, space ball, Motion capture device.. -Output Device: display *Frame buffer(visual content의 한 픽셀의 메모리를 저장, GPU에 위치(memory)) *processor CPU GPU 할 수 있는 것이 많다. (ALU) - 주로 명령 할 수 있는 것이 간단(종류) but 빠름. 간단한 일을 많이 할 수 있도록(ALU) - 여러 픽셀을 처리하기에 적합 Image Foramation 1. object : vertex에 따라 (define as vertex-set od location in a.. 더보기