전체 글

Computer Science/Computer Architecture

[Computer Organization & Design] Instructions: Language of the Computer - Part 1

Instruction Set 컴퓨터에서 사용되는 명령어들의 집합 - 서로 다른 컴퓨터는 서로 다른 Instruction Set을 가진다 (대부분 유사한 특징을 가지고 있긴 하다) - 초기 컴퓨터는 아주 단순한 IS를 가졌지만, 시간이 갈수록 반도체는 발달했지만 메모리는 덜 발달하여 하나의 명령어가 많은 일을 할 수 있도록 점점 IS가 복잡해짐 (CISC) - 많은 현대의 컴퓨터들은 간단한 명령어를 더 많이 씀 -> 하드웨어 구현을 심플하게 하고, 복잡한 명령어는 소프트웨어에게 맡기자 (RISC) Arithmetic Operations 산술 연산 명령어 (Add and Subtract) 2개의 source, 1개의 destination 3개의 operand를 가진다 -> add a, b, c의 꼴 (a =..

Computer Science/Computer Architecture

[Computer Organization & Design] Computer Abstractions & Technology - Part 3

https://kangcoder.tistory.com/entry/Computer-Organization-Design-Computer-Abstractions-Technology-Part-2 [Computer Organization & Design] Computer Abstractions & Technology - Part 2 https://kangcoder.tistory.com/10 [Computer Organization & Design] Computer Abstractions & Technology - Part 1 Computer Organization and Design MIPS Edition | David A. (Pardee Professor of Computer Science, Emeritus, ..

Computer Science/Computer Architecture

[Computer Organization & Design] Computer Abstractions & Technology - Part 2

https://kangcoder.tistory.com/10 [Computer Organization & Design] Computer Abstractions & Technology - Part 1 Computer Organization and Design MIPS Edition | David A. (Pardee Professor of Computer Science, Emeritus, University of Californ Computer Organization and Design MIPS Edition | The fifth edition of Computer Organization and Design-winner of a 2014 Textbook kangcoder.tistory.com Performan..

Computer Science/Computer Architecture

[Computer Organization & Design] Computer Abstractions & Technology - Part 1

Computer Organization and Design MIPS Edition | David A. (Pardee Professor of Computer Science, Emeritus, University of Californ Computer Organization and Design MIPS Edition | The fifth edition of Computer Organization and Design-winner of a 2014 Textbook Excellence Award (Texty) from The Text and Academic Authors Association-moves forward into the post-PC era with new examples, ex product.kyob..

Java/Java-Spring

[SpringBoot] Spring Security 없이 OAuth2(kakao) 로그인 해보기 with JWT - 1

이번에 토이프로젝트를 진행하면서 스프링으로 처음 로그인 서비스를 만들었다. OAuth2를 통한 카카오 로그인을 구현하려 했는데, 처음엔 스프링 시큐리티를 사용해서 구현하려 했지만 이해가 잘되지 않았고 그래서 일단 시큐리티 없이 쌩으로 구현을 해보자! 라는 생각으로 만들게 됐다. 1. OAuth2 로그인의 흐름 OAuth2 로그인이 진행되는 과정을 살펴보자. OAuth를 제공하는 서비스마다 다르겠지만, 이 흐름도는 카카오의 OAuth 흐름에 대해 그린 것이다. 사용자가 서비스를 이용하기 위해 로그인 창에 접근하면, 클라이언트는 사용자의 브라우저를 카카오 검증 서버로 리다이렉트 시킨다. 사용자가 정보를 입력하면 검증 서버는 입력한 정보가 일치하는지 검증한다. 일치한다면 클라이언트가 검증 서버에 등록한 정보제..

Algorithm

[Algorithm] 여러 가지 정렬2 - 빠른 정렬(1)

[여러 가지 정렬 1]에 나오는 정렬들 보다는 조금 복잡하지만 더 빠른, 배열을 정렬(오름차순)하는 방법을 알아보자. 1. Merge Sort 배열을 분할하여 각각 정렬하고, 정렬된 결과를 합치는 분할정복(Divide and Qunquer) 방식 주어진 배열을 둘로 나누어 각각 정렬하고, 이를 하나로 합친다. -> 둘로 나뉜 부분 배열은 어떻게 정렬할까? 둘로 나뉜 배열을 또 둘로 나누어 각각을 정렬하고, 이를 하나로 합친다. -> 또 나뉜 배열을 둘로 나누고, ... 길이가 N인 배열을 정렬하기 위해서는 길이가 N/2인 배열을 정렬해야 하고, 또 그 배열을 정렬하기 위해서는 길이가 N/4인 배열을 정렬해야 하고, ... , 결국 길이가 1인 배열을 정렬해야 하는데, 길이가 1인 배열을 정렬하는 것은 너..

Algorithm

[Algorithm] 여러 가지 정렬1 - 간단하지만 느린 정렬들

배열을 정렬(오름차순)할 수 있는 여러 가지 방법에 대해서 알아보자. 1. Selection Sort 주어진 배열에서 가장 작은 데이터를 선택하여 앞으로 보내는 정렬 첫 번째 과정에서 가장 작은 데이터를 찾아 배열의 첫 번째 자리에 넣고, 두 번째 과정에서 그 다음 작은 데이터를 찾아 두 번째 자리에 넣고, ... n-1자리까지 반복한다. n개의 데이터에서 가장 작은 데이터를 찾고, n-1개의 데이터에서 가장 작은 데이터를 찾고, 그 다음은 n-2개, n-3개, ... 이렇게 이어지기 때문에 O(N^2)의 시간복잡도를 가진다. public void selectionSort(int[] arr) { for (int i = 0; i < arr.length; i++) { for (int j = i + 1; j ..

Problem Set/Greedy

[Greedy] BOJ 1744 수 묶기 (Java)

https://www.acmicpc.net/problem/1744 1744번: 수 묶기 길이가 N인 수열이 주어졌을 때, 그 수열의 합을 구하려고 한다. 하지만, 그냥 그 수열의 합을 모두 더해서 구하는 것이 아니라, 수열의 두 수를 묶으려고 한다. 어떤 수를 묶으려고 할 때, 위치에 www.acmicpc.net 문제 분석 수열 N이 주어졌을 때, 수열의 두 수를 묶어서 (순서는 상관없음) 묶은 수들의 합이 최대가 되도록 하는 문제. 묶은 두 수는 곱해지며, 수는 한 번만 묶을 수 있고, 묶지 않을 수도 있다. 예전에 풀었던 문제인데 뭔가 greedy 하지 못하다는 생각이 들어 백준에서 더 깔끔하게 푸신 분들이 없나 참고하였다. 내 코드 import java.io.BufferedReader; import..

주니어 개발자의 아카이브
KangCoder`s Dev