1 / 18

제 2 강

제 2 강. 2 진수의 표현 방식. 도전 : How many can you count with 5 fingers?. How many can you count. 원시인들의 modified unary number system 우라빵 (1), 오코사 (2) “ 나 , 바나나 오코사 오코사 우라빵 쩝쩝 .” “ 나 , 오코사 오코사 오코사 오코사 오코사 오코사 오코사 오코사 쩝쩝 !”. 주판. 173. +215. 똑똑한 손가락. 펴면 2, 접으면 0. 펴면 4, 접으면 0.

saad
Download Presentation

제 2 강

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 제 2 강 2진수의 표현 방식

  2. 도전: How many can you count with 5 fingers?

  3. How many can you count • 원시인들의 modified unary number system • 우라빵(1), 오코사(2) • “나, 바나나 오코사 오코사 우라빵 쩝쩝.” • “나, 오코사 오코사 오코사 오코사 오코사 오코사 오코사 오코사 쩝쩝!”

  4. 주판 173 +215

  5. 똑똑한 손가락 펴면 2, 접으면 0 펴면 4, 접으면 0 펴면 1, 접으면 0 펴면 8, 접으면 0 펴면 16, 접으면 0

  6. 똑똑한 손가락 18 3 1

  7. 더 많이 세려면… • 펴면 2, 반쯤 펴면 1, 접으면 0 • 펴면 3, 2/3쯤 펴면 2, 1/3쯤 펴면 0 • 펴면 4, ¾쯤 펴면 3, 반쯤 펴면 2, ¼쯤 펴면 1, 접으면 0 • 얼마든지 이론적으로 가능

  8. Then Why Binary? 0 1 2 3 4

  9. 이진 정수

  10. 1000진수 ? • 12,345 • 10000 1개, • 1000 2개 • 100 3개 • 10 4개 • 1 5개

  11. 1000진수 ? • 12,345 • 1000 이 12개, • 1 이 345개 • * 기본 숫자를 0-9가 아닌0 – 999로 가정

  12. 우리나라는? • 만진수? • 1조2천3백억4천7백5십만9천7백4십4 • 1, 2300,4750,9744 • 영어권? • Billion, Million,Thousand

  13. 8진수(octal), 16진수(hexadecimal) • 2진수를 3자리씩 묶어서: • 101001110  101, 001, 110 • 5 1 6 • 4자리씩 묶으면: • 101001110  1, 0100, 1110 • 1 4 E • * 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

  14. 연습 • 2A16 • 348 0010 1010 = 32+8+2 = 42 011 100 = 16+8+4 = 28

  15. 음수의 표현 • 1의 보수: 1111…11 – 숫자 • 2의 보수: 10000…00 – 숫자 • 예: 8자리 2진수3의 1의 보수는? 1’s complement of 31111 1111 – 0000 0011 = 1111 11003의 2의 보수는?1111 1100 + 1 = 1111 1101

  16. 십진수를 2진수로 • 문제: 32 미만의 자연수를 2진수로 바꾸어 출력하는 프로그램 • 5비트로 나타내기로 하고 • 첫 비트가 1인지 0인지를 판단하는 방법? • Hint: 첫 비트가 1인 (1XXXX) 2진수의 특징은? • 답: 16 이상인 숫자이다.

  17. lab02_01 • 2진수 게임

  18. 2강 끝

More Related