이진수 변환

최종윤·2023년 5월 7일
0
  • categories of numbers
    정수: 자연수 음수 , 실수

  • positional notation
    진수에 따른 자리수를 표기한다.
    642 = 600+40+2 = 6x 10^2 + 6x 10^1 + 6x 10^0
    dn x R^(n-1) + d(n-1) x R^(n-2) + ... d(1)x R^0

  • convert n base to 10 base
    represent positional notation
    642 in 16 base: 6x8^2+ 4x8^1 + 2 -> 10 base

  • convert 10 base to n base
    dn x R^(n-1) + d(n-1) x R^(n-2) + ... d(1)x R^0

10진수를 R base positional notation으로 나타낸다 가정하고,
-> base 값으로 나눌 때마다 자리수를 하나씩 얻을 수 있다.
base로 나눈 몫을 가지고 다시 나눈다. 몫이 0 일 때까지 나눈다.

  • convert binary to octal
    10101011 = 10 101 011 = 2 5 3 in base 8
  • convert binary to hexadecimal
    10101011 = 1010 1011 = A(10) B(11) = AB in base 16
profile
https://github.com/jyzayu

0개의 댓글