BTC - 數位貨幣

By Bethany
at 2019-10-19T00:01
at 2019-10-19T00:01
Table of Contents
在 8 位元 Motorola 6809 處理器上,有道指令叫做 SEX,寓意是 “Sign EXtend”
SEX 123 應該輸出 0, 而 SEX -3 要輸出 0xffffffff (取決於有效位數)
考慮一個 32 位元版本的 SEX 實作如下,假設執行環境是 little-endian:
#include <stdint.h>
static inline uint32_t sex32(int32_t x) {
union {
TYPE w;
struct { uint32_t lo, hi; };
} z = {.w = x};
return z.hi;
}
試問: TYPE=?
第一個留下正確答案和地址的推文贈20000 satoshi
Answer:
uint64_t或int64_t
lilian0111 & akuei1031 各解出一半,得 10000 satashi
TXID
b153cdf0174f82ec9b7f0eb699e814f4d6b565dbfbb936cbbdb971dd34ebec00
--
SEX 123 應該輸出 0, 而 SEX -3 要輸出 0xffffffff (取決於有效位數)
考慮一個 32 位元版本的 SEX 實作如下,假設執行環境是 little-endian:
#include <stdint.h>
static inline uint32_t sex32(int32_t x) {
union {
TYPE w;
struct { uint32_t lo, hi; };
} z = {.w = x};
return z.hi;
}
試問: TYPE=?
第一個留下正確答案和地址的推文贈20000 satoshi
Answer:
uint64_t或int64_t
lilian0111 & akuei1031 各解出一半,得 10000 satashi
TXID
b153cdf0174f82ec9b7f0eb699e814f4d6b565dbfbb936cbbdb971dd34ebec00
--
Tags:
數位貨幣
All Comments

By Kristin
at 2019-10-23T01:19
at 2019-10-23T01:19

By Hedda
at 2019-10-24T09:00
at 2019-10-24T09:00

By Poppy
at 2019-10-25T08:34
at 2019-10-25T08:34

By Regina
at 2019-10-26T15:59
at 2019-10-26T15:59

By Selena
at 2019-10-29T18:48
at 2019-10-29T18:48

By Leila
at 2019-10-29T23:10
at 2019-10-29T23:10

By James
at 2019-10-30T01:56
at 2019-10-30T01:56

By Tracy
at 2019-11-03T16:42
at 2019-11-03T16:42

By Skylar DavisLinda
at 2019-11-04T05:15
at 2019-11-04T05:15

By Audriana
at 2019-11-09T00:39
at 2019-11-09T00:39

By Gilbert
at 2019-11-13T02:52
at 2019-11-13T02:52

By Edith
at 2019-11-17T23:38
at 2019-11-17T23:38

By Anthony
at 2019-11-20T19:21
at 2019-11-20T19:21

By Ula
at 2019-11-21T02:31
at 2019-11-21T02:31

By Regina
at 2019-11-24T23:17
at 2019-11-24T23:17

By Christine
at 2019-11-27T00:32
at 2019-11-27T00:32

By Charlotte
at 2019-11-29T09:16
at 2019-11-29T09:16
Related Posts
G7澆冷水:臉書不該推Libra 除非監管法規完備

By Suhail Hany
at 2019-10-18T18:50
at 2019-10-18T18:50
Bitfinex無限額度「多層次傳銷」推薦計畫

By Xanthe
at 2019-10-18T17:11
at 2019-10-18T17:11
BTC

By Isabella
at 2019-10-17T22:59
at 2019-10-17T22:59
IOTA

By Kumar
at 2019-10-17T22:13
at 2019-10-17T22:13
11/3 MXC極域 台灣見面會

By Faithe
at 2019-10-17T20:13
at 2019-10-17T20:13