Binary Hexadecimal Conversion

來源:互聯網
上載者:User

http://www.plcdev.com/plc_basics/number_systems_and_codes/binary_people_learning_your_1s_and_0s

翻譯及轉換方法

bit    位

nibble(4bits)  半位元組

byte(8bits)  位元組

word(16bits) 雙位元組

dword(32bits) 4位元組

 

二進位表示(共16位)

1011100110101011

 

八進位(3位做為1位)

1-011-100-110-101-011

=>o 1-3-4-6-5-3

=>o134653

 

十六進位(4位做為1位)

1011-1001-1010-1011

=>0x B-9-A-B

=>0xB9AB

 

轉換表
二進位   2進位    16進位   10進位2^0  = 0b0000-0001 = 0x0001 = 12^1  = 0b0000-0010 = 0x0002 = 22^2  = 0b0000-0100 = 0x0004 = 42^3  = 0b0000-1000 = 0x0008 = 82^4  = 0b0001-0000 = 0x0010 = 162^5  = 0b0010-0000 = 0x0020 = 322^6  = 0b0100-0000 = 0x0040 = 642^7  = 0b1000-0000 = 0x0080 = 1282^8  = 0b0000-0001-0000-0000 = 0x0100 = 2562^9  = 0b0000-0010-0000-0000 = 0x0200 = 5122^10 = 0b0000-0100-0000-0000 = 0x0400 = 10242^11 = 0b0000-1000-0000-0000 = 0x0800 = 20482^12 = 0b0001-0000-0000-0000 = 0x1000 = 40962^13 = 0b0010-0000-0000-0000 = 0x2000 = 81922^14 = 0b0100-0000-0000-0000 = 0x4000 = 163842^15 = 0b1000-0000-0000-0000 = 0x8000 = 327682^16 = 0b0000-0001-0000-0000-0000-0000 = 0x0001-0000 = 655362^17 = 0b0000-0010-0000-0000-0000-0000 = 0x0002-0000 = 1310722^18 = 0b0000-0100-0000-0000-0000-0000 = 0x0004-0000 = 2621442^19 = 0b0000-1000-0000-0000-0000-0000 = 0x0008-0000 = 5242882^20 = 0b0001-0000-0000-0000-0000-0000 = 0x0010-0000 = 10485762^21 = 0b0010-0000-0000-0000-0000-0000 = 0x0020-0000 = 20971522^22 = 0b0100-0000-0000-0000-0000-0000 = 0x0040-0000 = 41943042^23 = 0b1000-0000-0000-0000-0000-0000 = 0x0080-0000 = 83886082^24 = 0b0000-0001-0000-0000-0000-0000-0000-0000 = 0x0100-0000 = 167772162^25 = 0b0000-0010-0000-0000-0000-0000-0000-0000 = 0x0200-0000 = 335544322^26 = 0b0000-0100-0000-0000-0000-0000-0000-0000 = 0x0400-0000 = 671088642^27 = 0b0000-1000-0000-0000-0000-0000-0000-0000 = 0x0800-0000 = 1342177282^28 = 0b0001-0000-0000-0000-0000-0000-0000-0000 = 0x1000-0000 = 2684354562^29 = 0b0010-0000-0000-0000-0000-0000-0000-0000 = 0x2000-0000 = 5368709122^30 = 0b0100-0000-0000-0000-0000-0000-0000-0000 = 0x4000-0000 = 10737418242^31 = 0b1000-0000-0000-0000-0000-0000-0000-0000 = 0x8000-0000 = 2147483648(2^32-1) = 0xffff-ffff = 4294967295

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.