본문 바로가기

전체 글

(177)
1-2강 - Java Primitive Type, Variable, Constant cf> Data type 공부 전 알아둘 내용 class가 variable의 data type이 된다. 그래서 대부분의 variable은 object이다. 하지만 일부 중 primitive type이라는 것이 있다. (primitive type은 class에 속하지 않는다.) 3. Primitive Types 1) Integer type 1> 종류 byte (1 byte): -128 ~ 127 short (2 bytes): -32,768 ~ 32,767 int (4 bytes): -2,147,483,648 ~ 2,147,483,647 long (8 bytes): -9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807 2> integer type 중 사용하고 싶은..
1-1강 - JAVA 기본기 (Hello World!) 1. object, class, method package cse3040; public class HelloWorld { public static static main (String[] args) { //TODO Auto-generated method stub System.out.printIn("Hello, World!"); } } java는 모든 것이 object로 되어있다. object는 class의 instance이다. → 즉, java는 일단 class를 정의하고 그 안에서 모든 것을 진행한다고 생각하면 된다. 1) method class에 소속된 함수이다. 1> method의 구조 {return type} {함수 이름} {input} 2> main 다른 method와 다르게 프로그램에서 맨 처음..
3-2강 - 자료구조 & C, C++ programming 2 (Linked List management, Stack & Queue) 3. Linked List Management 구현은 크게 2가지입니다. (array로 구현, dynamic memory allocation) 0) Singly Linked List 기본 구조 typedef struct _SLL { int i; struct _SLL *p; } SLL 1> 필요한 field가 더 있다면 더 추가해도 된다. (양방향성을 구현할 수도 있다.) 2> 위 구조를 이용해서 stack, queue 등을 구현할 수 있다. 3> 단점 : 탐색에 O(n)의 시간 복잡도가 발생한다. 1) Linked List Management의 필요성 allocation/deallocation 함수인 malloc과 free는 속도가 빠른 함수가 아니다. (new와 delete도) 또한, 이를 호출하는데도..
3-1강 - 자료구조 & C, C++ programming 1 (call by reference, dynamic allocation) 1. Swapping Function swap1 과 swap2는 동일한 기능을 합니다. (속도와 같은 세세한 사항은 다를 수 있어도 기능 자체는 동일합니다.) 2. Dynamic Memory Allocation 0) static memory int staticArr[10]; 프로그램이 종료될 때까지 메모리가 유지된다. 1) malloc의 기본형 int *dynamicArr = (int *)malloc(10 * sizeof(int)); - 위의 코드로 인해 10개의 int를 위한 memory가 할당된다. (그리고 이 array를 가리킬 pointer variable도 할당된다.) - 중간에 메모리를 free로 해제할 수 있다. cf> 심각한 오류가 있을 경우를 대비하는 법 if/else문으로 오류인 경우 ..
2-1강 - Combinational system 1 (디지털 논리 회로, 논리 연산, 트랜지스터) 1. Digital Logic Circuit 0) 관련 개념 1> Digital circuit : binary information을 다루는 hardware component 2> Basic logic operator : 기본적인 logic function (AND, OR, NOT과 같은 것들) 3> logic gate : logic function을 구현 4> Boolean Algebra : logic function을 구현하고 변환하는 mathematical system 5> 회로는 Hierarchical design 한다. (Y-chart) 6> 회로는 보는 관점에 따라 base circuit element가 바뀔 수 있다. (Transistor → Logic gate → Wire) 1) Level..
1-3강 - Digital systems and number systems 3 (BCD, Gray code, Hamming code) 5. Binary Coded Decimal 1) Binary Coded Decimal BCD : 8, 4, 2, 1 code (BCD를 일반적으로 8,4,2,1 code라고 부른다.) - 10진수를 2진수로 표현한 것 (옛날 컴퓨터에서 10진수를 편하게 입출력하기 위해 사용) - 8, 4, 2, 1은 weight을 의미한다. - 즉, BCD code는 weighted code이다. - decimal digits(0~9) 각각을 weight을 기반으로한 binary number로 표현한다. 2) BCD addition BCD의 특성상 해당 bit(4-bit)가 9를 넘지 않아야하는데 넘는 경우에는 10을 빼주면 된다. 하지만 10을 그냥 뺄수는 없으니 modulo 16이라고 생각하고 6을 더한다. 여기도 ..
1-2강 - Digital systems and number systems 2 (number system in digital system) 3. Number Systems 1) Number Systems n : number of digits r : base number (radix) a : coefficient (0 ≤ a_i octal system binary number → octal number 변환 → binary number 3개(3-bit)가 octal digit 1개에 대응 2> hexadecimal number system binary number → hexadecimal number 변환 → binary number 4개(3-bit)가 hexadecimal digit 1개에 대응 3> conversion example 4. representation of negative..
1-1강 - Digital systems and number systems 1 (Digital system, signal) 1. Digital system 1) input & output input : discrete informatation과 discrete internal information(system state) output : discrete outputs 1> input - 컴퓨터는 continuous 정보는 처리할 수 없어서(너무 많기 때문에) discrete한 정보를 받는다. - system state(현재 내장된 상태)도 input을 처리하기도 한다. 2> Discrete Information Processing System - 위의 둘(input, system state)을 이 system에서 처리한다. 3> output - 역시 output도 discrete하다. 2) Digital system의 종류 ..