1 / 4

How to Convert Decimal Numbers to Binary

How to Convert Decimal Numbers to Binary . EXAMPLES. Convert 37 to Binary. 128 64 32 16 8 4 2 1 128 doesn’t fit into 37 b 7 =0 64 doesn’t fit into 37 b 6 =0 32 fits into 37 b 5 =1

baris
Télécharger la présentation

How to Convert Decimal Numbers to Binary

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. How to Convert Decimal Numbers to Binary EXAMPLES

  2. Convert 37 to Binary • 128 64 32 16 8 4 2 1 • 128 doesn’t fit into 37 b7=0 • 64 doesn’t fit into 37 b6=0 • 32 fits into 37 b5=1 • Subtract: 37 – 32 = 5 • Continue the process with 5 • 16 doesn’t fit into 5 b4=0 • 8 doesn’t fit into 5 b3=0 • 4 does fit into 5 b2=1 • Subtract: 5 - 4 = 1 • Continue the process with 1 • 2 doesn’t fit into 1 b1=0 • 1 fits into 1 b0=1 • 00100101

  3. Convert 37 to Binary - Second Method • Divide by 2 and store the remainder • 37/2=18 b0=1 • 18/2 =9 b1=0 • 9/2=4 b2=1 • 4/2=2 b3=0 • 2/2=1 b4=0 • 1/2=0 b5=1 • Write remainders from bottom up and pad with leading 0’s to fill all 8 bits • 00100101

  4. Convert 259 to binary • 259/2 = 129 b0=1 • 129/2 = 64 b1=1 • 64/2 = 32 b2=0 • 32/2=16 b3=0 • 16/2=8 b4=0 • 8/2=4 b5=0 • 4/2=2 b6=0 • 2/2 =1 b7=0 • 1/2 = 0 b8=1 • 00000001 00000011 • 2 bytes are needed to store this number

More Related