Introduction to Number Representation


Download 0.98 Mb.
bet1/2
Sana09.01.2022
Hajmi0.98 Mb.
#261703
  1   2
Bog'liq
Binary ALevelComputerScience

Introduction to Number Representation

Binary

Binary

  • All computer processing is carried out digitally.
  • This means that the processor handles instructions as binary codes – zeros and ones.
  • All data on a PC is essentially 0’s and 1’s.

Converting binary into positive denary integers

  • Whole positive denary (base ten) numbers are converted into binary as follows:
  • 135 from denary into binary
  • 128 + 4 + 2 + 1 = 135
  • 128
  • 64
  • 32
  • 16
  • 8
  • 4
  • 2
  • 1
  • MSB
  • LSB
  • 1
  • 0
  • 0
  • 0
  • 0
  • 1
  • 1
  • 1

The repeated division method

  • A method for converting denary to binary:
  • 98 in denary into binary:
  • 98 divide by 2 = 49 remainder 0
  • 49 divide by 2 = 24 remainder 1
  • 24 divide by 2 = 12 remainder 0
  • 12 divide by 2 = 6 remainder 0
  • 6 divide by 2 = 3 remainder 0
  • 3 divide by 2 = 1 remainder 1
  • 1 divide by 2 = 0 remainder 1
  • 0 divide by 2 = 0 remainder 0
  • Read the binary code from the remainder from bottom to the top:
  • 01100010 which equals 98
  • DIV
  • MOD

Download 0.98 Mb.

Do'stlaringiz bilan baham:
  1   2




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling