CS
-
컴퓨터는 어떻게 작동할까 <1- ALU>CS/하드웨어 2023. 12. 21. 03:53
공부에 온전히 시간을 쏟을 수 있어서 재밌는 요즘입니다. 32bit 컴퓨터와 64bit 컴퓨터가 무슨 차이인지를 알아보다가, cpu의 작동까지 흘러왔고 cs기초를 조금 더 쌓을 수 있는 기회가 되었던 것 같아 적어봅니다. 이 시리즈들은 아래 영상에 기반하고 있습니다. ALU에 대한 내용 by CrashCourse 전반적인 cpu 실행 흐름 영상 by bRd 3D 트랜지스터와 논리회로 '너무 하위 레이어인가'라는 생각이 들기도 하지만 정리하는 김에 한번 적어봅니다. 1. AND Gate 실제 코드레벨에서 사용하는 && 를 도식화한 이미지! 2. OR Gate 실제 코드레벨에서 사용하는 || 를 도식화한 이미지! 3. NOT Gate 실제 코드레벨에서 사용하는 !를 도식화한 이미지! 4. XOR Gate X..
-
She # bang !CS/시스템 프로그래밍 2023. 12. 17. 00:10
자주 눈에 보이지만 그냥 써야되나보다 하고 지나갔던 것을 짚어봅니다. 스프링 프로젝트를 설치하는 스크립트를 작성하다가 의문이 들어서 찾아보게 되었습니다. 1. Shebang이란? 스크립트 파일 맨 첫줄에 적는 이건 뭐지? 주석인가? #!/usr/bin/env bash 우선 이 줄의 명칭은 shebang입니다. 왜냐하면 #! 으로 시작하기 때문입니다~ 커뮤니티에서 #을 she 혹은 hash 라고 부르고 !을 bang이라고 부르는 것에서 유래한다고 하네요. 2. 역할 해당 파일이 어떤 실행기를 통해서 실행되어야하는지를 명시하는 역할입니다. 한번 자세하게 살펴볼까요? /usr/bin/env bash 잘은 모르겠지만 env 하면 환경변수 관련 내용일 것 같은 느낌입니다. 위 경로에 가보면 실제로 env라는 실행..
-
Tree 란?CS/자료구조 2023. 10. 28. 20:13
요즘 프로그래밍을 공부하는 사람들을 만나면, 다들 '자료구조 = 코딩테스트 준비' 라는 생각을 하고 있는 것 같습니다. 저는 수학에 사칙연산이 기본이라면, 코드를 작성할 때는 자료구조가 그 역할을 한다고 생각하는데요. 일하면서 트리에 익숙하지 않아서 고생했던 적들이 있어서, 트리에 관한 글을 써보려고 합니다. 1. Tree 란? 트리는 노드(Node)와 간선(Edge)로 이루어져있고, 순환이 존재하지 않는 계층적 자료 구조입니다. 간단하게 생각해보면, 트리는 이름에서 알 수 있듯이 나무를 뒤집어 놓은 모양입니다. 하나씩 살펴보면, 노드(Node)를 가지가 뻗어져 나오는 마디라고 생각하고 간선(Edge)을 마디라고 생각하면 좋을 것 같네요. 그리고 순환이 존재하지 않는다는 것은 노드가 자기 자신을 다시 방..
-
프로세스와 스레드의 실행 방식CS/운영체제 2023. 10. 22. 16:51
글을 시작하기에 앞서, 이 글은 유튜브 영상을 기반으로 학습을 위해 정리한 글이라는 점 말씀드립니다. 더 정확하고 알찬 설명은 아래의 영상을 보시기를 권해드립니다. 쉬운코드 - 프로세스, 스레드, 멀티태스킹, 멀티스레딩, 멀티프로세싱, 멀티프로그래밍, 이 모든 것을 한 방에 깔끔하게 설명합니다!! 콘텐츠 퀄리티 만족하실 겁니다! https://www.youtube.com/watch?v=QmtYKZC0lMU&list=PLcXyemr8ZeoQOtSUjwaer0VMJSMfa-9G-&ab_channel=%EC%89%AC%EC%9A%B4%EC%BD%94%EB%93%9C "컴퓨터를 사용한다"는 문장의 뜻 우리가 컴퓨터를 사용한다고 하면 대개 컴퓨터에 설치되어있는 프로그램을 사용하는 것을 이야기한다. 위 문장을 행동..