fengyuwusong's recent timeline updates
fengyuwusong

fengyuwusong

V2EX member #337130, joined on 2018-07-30 11:47:01 +08:00
fengyuwusong's recent replies
支持一下
Apr 19, 2019
Replied to a topic by luckyc Python 求教一个 Python 反码的问题.
你这不是补码吗?...

正数
源码反码补码都一样

负数
反码转源码:符号位不变, 其他按位取反
补码转源码:符号为不变, 其他按位取反 再加 1

例如 1101110 => 1010001 + 1 = 1010010 = -1 * (2^1 + 2^4) = -1 * ( 2+16 )= -18
剩下那个你可以自己试试。
我是分母
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2450 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 21ms · UTC 01:27 · PVG 09:27 · LAX 18:27 · JFK 21:27
♥ Do have faith in what you're doing.