EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/

ethereum smart contract 基本


uint256 => 2^256
byte32 => 2^8^32 (byte=2^8) or 32個byte 放32字元(ascii)

0x => HEX 16進位

0x64 => 6 * (16^1) + 4 * (16^0) = 100

0x0164 => 1 * (16^2) + 6 * (16^1) + 4 * (16^0) = 365

0x HEX 16進位 最小0 最大F


回到最上面byte32 轉成 0x HEX 為了避免太長,2^8 = 256 => 16^2 => 16位元顯示要兩位 0~256 => 00~FF || FF => 15 * (16^1) + 15 * (16^0)
所以 0x0164,通常都是兩位處理 0x 01 64


unit256 = byte32
000000000000000000000000000000000000000000000000006a94d74f430000
1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2

Hex number: 6a94d74f430000

Decimal number: 30000000000000000

Binary number: 1101010100101001101011101001111010000110000000000000000
Binary number: 110 1010 1001 0100 1101 0111 0100 1111 0100 0011 0000 0000 0000 0000

Decimal calculation:
0 = (0 × 16⁶³) + (0 × 16⁶²) + (0 × 16⁶¹) + (0 × 16⁶⁰) + (0 × 16⁵⁹) + (0 × 16⁵⁸) + (0 × 16⁵⁷) + (0 × 16⁵⁶) + (0 × 16⁵⁵) + (0 × 16⁵⁴) + (0 × 16⁵³) + (0 × 16⁵²) + (0 × 16⁵¹) + (0 × 16⁵⁰) + (0 × 16⁴⁹) + (0 × 16⁴⁸) + (0 × 16⁴⁷) + (0 × 16⁴⁶) + (0 × 16⁴⁵) + (0 × 16⁴⁴) + (0 × 16⁴³) + (0 × 16⁴²) + (0 × 16⁴¹) + (0 × 16⁴⁰) + (0 × 16³⁹) + (0 × 16³⁸) + (0 × 16³⁷) + (0 × 16³⁶) + (0 × 16³⁵) + (0 × 16³⁴) + (0 × 16³³) + (0 × 16³²) + (0 × 16³¹) + (0 × 16³⁰) + (0 × 16²⁹) + (0 × 16²⁸) + (0 × 16²⁷) + (0 × 16²⁶) + (0 × 16²⁵) + (0 × 16²⁴) + (0 × 16²³) + (0 × 16²²) + (0 × 16²¹) + (0 × 16²⁰) + (0 × 16¹⁹) + (0 × 16¹⁸) + (0 × 16¹⁷) + (0 × 16¹⁶) + (0 × 16¹⁵) + (0 × 16¹⁴) + (6 × 16¹³) + (10 × 16¹²) + (9 × 16¹¹) + (4 × 16¹⁰) + (13 × 16⁹) + (7 × 16⁸) + (4 × 16⁷) + (15 × 16⁶) + (4 × 16⁵) + (3 × 16⁴) + (0 × 16³) + (0 × 16²) + (0 × 16¹) + (0 × 16⁰) = 30000000000000000



=====

address last 20 bytes Byte20 換成 Hex 就40位元(characters)加上0x,就有42 characters
EX: cd2a3d9f938e13cd947ec05abc7fe734df8dd826