Memory consists of bits represented as 0s and 1s.
Memory is usually addressed by bytes (8 bits), though some machines may use word (32 bits) or double word (64 bits) addressing.
In artificial intelligence, quantization techniques can utilize sub-byte data types like 2-bit or 4-bit representations. However, the smallest addressable unit in memory remains the byte. To access individual bits, operations such as shifting and extraction must be employed.
Character: Characters are represented in 7 bits (ASCII code), or 8 bits (extended ASCII); 26 characters (upper and lower cases → 52) + punctuations are represented in ASCII code; Standard code to cover all the world’s languages: Unicode-

Digitization: From Analog to Digital


Memory locations (addresses): In 32-bit machines, addresses are 32b, address up to 4GB; In 64-bit machines, addresses are 64b, up to 16ExaBytes
N bits can represent $2^N$ different things
Computer Commands (Instructions)


sltu : 无符号比较指令,sltu a3,a2,a0 # 若a2 < a0 (无符号比较), a3=1, 否则a3=0
Instructions are composed of:
Register: specify a register to designate which register is used as an operand
Memory: usually a (base)+offset to specify the address of the memory operand
data address: offset is relative to a base register
instruction address: offset is relative to the PC or a register



Remember: In 2’s complement numbers, positive integer numbers have leading zero’s, 0000xxx; negative integer numbers have leading one’s, 1111yyy.
Why not 1’s complement?