Download presentation
Presentation is loading. Please wait.
Published byΆιμον Αγγελίδης Modified over 6 years ago
1
Everything that goes on under the hood of a computer is done in binary -- the language of 0s and 1s.
If we have only two numbers, it's very easy to represent them in the physical world using electricity. You can think of each binary digit as a switch or a light bulb that can be either on or off, where by convention 0 is thought of as "off" and 1 is "on".
2
We are used to decimal notation:
1* * *100 = 163 Let's think more carefully about decimal notation. To represent the number 163, we've got a 3 in the 1s place (100), a 6 in the 10s place (101), and a 1 in the 100s place (102). You get 163 when you multiply these digits by their respective powers of 10 and sum them.
3
Computers store and process data via binary notation:
1*27 + 0*26 + 1*25 + 0*24 + 0*23 + 0*22 + 1*21 + 1*20 = 163 To represent this same number in binary, you'll need a 1 in the 1s place (20), a 1 in the 2s place (21), a 1 in the 32s place (25), and a 1 in the 128s place (27). You get 163 when you multiply these digits by their respective powers of 2 and sum them.
4
Converting Binary to Decimal (and vice versa)
1 = 1*20 = 1 10 = 1*21 + 0*20 = 2 11 = 1*21 + 1*20 = 3 100 = 1*22 + 0*21 + 0*20 = 4 101 = 1*22 + 0*21 + 1*20 = 5 Let's count to 5 in binary! Note how we can multiply the binary digits by their respective powers of two and sum them to convert to a decimal value.
5
Addition and Subtraction (Don’t forget to carry your 1s)
Addition and subtraction in binary works the same way as in decimal. Start on the right, and carry the 1s as needed.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.