Day 01 7.11

:::warning Why Boolean type is 8-bit in C / C++ ?
1 Byte is the minimum element of memory addressing.
8-bit is the most efficient way for memory addressing. ::: :::warning An ISA can have multiple microarchitecture. ::: :::warning Compiler vs. Assembler
Assemble language is bijective to ISA, but programming language are not.
Compiler transform high level programming language to machine code.
Assemble transform assemble language to machine code. ::: :::warning Value Representation
Signed Magnitide 源码
most intuitive, but can not do calculation.
1’s Complement 反码
can do calculation, but have +0 and -0, which wastes.
2’s Complement 补码
can do calculation, no waste binary number.
-16 is 2’s complement is itself ::: :::warning Scope of some reprentations
Unsigned Review - 图1
2’s complement Review - 图2 ::: :::warning Overflow
A trick to judge overflow :
two number adds, if positive gets negative, or vice versa, then it overflows.
A positive number plus a negative number never overflows. ::: :::warning How to move left ?
Review - 图3 ::: :::warning Operation Law of logic variable
Review - 图4 Review - 图5
Review - 图6
Review - 图7
xor operation is recursive.
Provided thatReview - 图8, then if two variable is known, the rest one can be determined.
A way to exchange X, Y
Review - 图9 :::

Day 02 7.12

:::warning 取位 X AND M
打开位 X OR M
关闭位 X AND (NOT (M)) ::: :::warning

Single Presicion 32-bit

Normalized Form

Review - 图10 is called offset.
Review - 图11
Review - 图12
Review - 图13for other forms

Other Precision

Double Precision 64-bit
Half Precision 16-bit ::: :::warning

Logical Completeness

Not more 1 or 0 signal can be considered. :::