Skip to content

Bits, binary, and bitwise operators · ⁨位、二进制与按位运算⁩

English

Numbers are bits

  • Inside the computer, every int is a row of bits — each bit is a 0 or a 1.
  • We usually read numbers in base 10, but the machine stores them in base 2 (binary).
  • Bitwise operators let you look at and change individual bits.
中文

数字就是一串位

  • 在计算机内部,每个 int 都是一排位 —— 每个位是 0 或 1。
  • 我们通常用十进制读数字,但机器把它们存成二进制(基数 2)。
  • 按位运算符让你查看和改动单个的位。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩