close
Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 已解決
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 已解決 
2的補數轉換成10進位
Mar 22nd 2015, 23:04

在電腦中是以2的補數來表示有號整數型態

例如:資料長度一個byte的有號整數 表示範圍 -128~127
最高位表示正負號

65=01000001b
-65=10111111b

-65 二的補數過程如下
65 =>1的補碼+1

65=01000001b (1的補碼)=>10111110b +1 => 10111111b (表示-65)

為什麼計算機要用2的補數表示有號數呢?
因為這樣子能用加法來處理減法
65=01000001b
-65=10111111b
----------------------------
100000000b (取低8bit) 答案就是0了...

你的問題 因為最高位為0 故十進制為2^3+2^6=72

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 kkovdy25d40iq 的頭像
    kkovdy25d40iq

    線上遊戲排行榜2013/2014,進擊的巨人線上看,candy crush saga外掛,正妹寫真三圍

    kkovdy25d40iq 發表在 痞客邦 留言(0) 人氣()