[CE] Ex : 2's complement

2023. 3. 21. 13:21·Computer/CE
728x90
728x90

다음 문제들은 8bit 의 binary로 2's complement사용한 예제들이다.

1

$$
26-15 = 26 + (-15) = 0001 1010_2 + 1111 0001_2 = 10000 1011_2
$$

10000 1011에서 MSB의 carryout을 버리면 0000 1011이 된다. 이는 $8+2+1=11$ 에 해당함.

2

$$
-31-6 = (-31) + (-6) = 1110 0001_2 + 1111 1010_2 = 11101 1011_2
$$

11101 1011에서 MSB의 carryout을 버리면 1101 1011이 된다. 이는 $-37$ 에 해당함.

3

$$
144 – 156 = 144 + (-156) = 1001 0000_2 + 0110 0100_2 = 1111 0100_2
$$

1111 0100는 2's complement에서 -12 에 해당함.

 


좀 더 자세한 내용은 다음 URL을 참고할 것.

https://dsaint31.me/mkdocs_site/CE/ch01/negative_number/

 

728x90

'Computer > CE' 카테고리의 다른 글

[Linux] Signal : SIGINT  (0) 2023.04.09
[CE] URL, URI and UNC  (1) 2023.04.09
[Tip] Chrome Hot Keys (shortcut)  (0) 2023.03.20
Basic Input Output System (BIOS) and CMOS  (1) 2023.02.23
[CE] Tree vs. Graph  (0) 2023.02.20
'Computer/CE' 카테고리의 다른 글
  • [Linux] Signal : SIGINT
  • [CE] URL, URI and UNC
  • [Tip] Chrome Hot Keys (shortcut)
  • Basic Input Output System (BIOS) and CMOS
dsaint31x
dsaint31x
    반응형
    250x250
  • dsaint31x
    Dsaint31's blog
    dsaint31x
  • 전체
    오늘
    어제
    • 분류 전체보기 (785)
      • Private Life (15)
      • Programming (55)
        • DIP (116)
        • ML (34)
      • Computer (119)
        • CE (53)
        • ETC (33)
        • CUDA (3)
        • Blog, Markdown, Latex (4)
        • Linux (9)
      • ... (368)
        • Signals and Systems (115)
        • Math (176)
        • Linear Algebra (33)
        • Physics (43)
        • 인성세미나 (1)
      • 정리필요. (61)
        • 의료기기의 이해 (6)
        • PET, MRI and so on. (7)
        • PET Study 2009 (1)
        • 방사선 장해방호 (5)
        • 방사선 생물학 (3)
        • 방사선 계측 (9)
        • 기타 방사능관련 (3)
        • 고시 (9)
        • 정리 (18)
      • RI (0)
      • 원자력,방사능 관련법 (2)
  • 블로그 메뉴

    • Math
    • Programming
    • SS
    • DIP
  • 링크

    • Convex Optimization For All
  • 공지사항

    • Test
    • PET Study 2009
    • 기타 방사능관련.
  • 인기 글

  • 태그

    cv2
    random
    Python
    function
    numpy
    Term
    math
    SS
    인허가제도
    signal_and_system
    fourier transform
    SIGNAL
    signals_and_systems
    Vector
    Probability
    Optimization
    linear algebra
    ML
    Programming
    opencv
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
dsaint31x
[CE] Ex : 2's complement
상단으로

티스토리툴바