Bỏ qua nội dung

Lesson 54: Negative numbers

English

Below zero

  • 8 bits can store 0 to 255. To store negative numbers too, computers use two's complement.
  • The leftmost bit is worth −128. All the other bits keep their normal values.
  • So 8-bit two's complement stores −128 to +127.

Words for this lesson

Word Meaning
two's complement binary for positive and negative whole numbers
most significant bit the leftmost bit; 1 means negative
flip change every 0 to 1 and every 1 to 0

Đăng nhập hoặc tạo tài khoản

IGCSE, A-Level & AP