Download presentation
Presentation is loading. Please wait.
Published byJoshua Norton Modified over 9 years ago
1
1 12/08/03SW Abingdon and Witney College Binary Converting to and from decimal
2
2 08/08/2015SW Abingdon and Witney College Decimal We normally use the decimal (denary) system, also called base 10 There are 10 different symbols (digits) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 To count higher than nine we re-use the symbols by putting them in columns The value of a symbol depends on its position
3
3 08/08/2015SW Abingdon and Witney College Decimal positions 1000100101 ThousandsHundredsTensUnits 8253 Eight thousand two hundred and fifty three
4
4 08/08/2015SW Abingdon and Witney College Binary Computers use the binary system, also called base 2 There are two different symbols (digits) 0, 1 To count higher than one we re-use the symbols by putting them in columns The value of a symbol depends on its position
5
5 08/08/2015SW Abingdon and Witney College Binary positions 8421 EightsFoursTwosUnits 1101 One eight, one four, no twos and one unit That makes thirteen
6
6 08/08/2015SW Abingdon and Witney College Counting in binary and decimal 0010008 1110019 102101010 113101111 1004110012 1015110113 1106111014 1117111115
7
7 08/08/2015SW Abingdon and Witney College Why do computers use binary? Computer components that store or handle data are often two-state devices This is like a switch that can be on or off A memory unit could exist in two voltage states, high or low A voltage on a cable could be high or low A light could be on or off Two states can be coded by binary 0 and 1
8
8 08/08/2015SW Abingdon and Witney College Why am I learning about binary? You will learn about IP addresses and how to split up a network into subnets You need to work out subnet addresses and workstation addresses For this you need to use binary
9
9 08/08/2015SW Abingdon and Witney College Bytes or octets We often handle binary digits (bits) in groups of eight Sometimes these groups are called bytes Sometimes they are called octets We shall often be calling them octets Examples of octets: 00101101 10110010
10
10 08/08/2015SW Abingdon and Witney College Coding data into binary Decimal numbers can be converted into binary numbers Characters (letters, punctuation, digits) can be coded using ASCII or EBCDIC Graphics, sounds and videos have several different and complicated methods for coding them Program instructions are coded in a machine code that depends on the type of processor
11
11 08/08/2015SW Abingdon and Witney College ACSII American Standard Code for Information Interchange used for our alphabet Uses 8 bits (one byte/octet) for each character 7 bits for the basic character and one bit for error checking Chinese, Arabic and some other languages require 16 bits (2 bytes) for each character – they use Unicode, related to ASCII
12
12 08/08/2015SW Abingdon and Witney College Convert binary to decimal Position87654321 Value1286432168421 Binary Convert 11001010 binary to decimal Write in the binary digits under their values
13
13 08/08/2015SW Abingdon and Witney College Convert binary to decimal Position87654321 Value1286432168421 Binary11001010 Convert 11001010 binary to decimal Write in the binary digits under their values Next write in the value for each binary 1 digit
14
14 08/08/2015SW Abingdon and Witney College Convert binary to decimal Position87654321 Value1286432168421 Binary11001010 1286482 Convert 11001010 binary to decimal Write in the binary digits under their values Next write in the value for each binary 1 digit Add up the values 128 + 64 + 8 + 2 = 202
15
15 08/08/2015SW Abingdon and Witney College One for you to try Convert 10010101 from binary (base 2) to decimal (base 10) Position87654321 Value1286432168421 Binary
16
16 08/08/2015SW Abingdon and Witney College Convert decimal to binary Position87654321 Value1286432168421 Binary Check Convert 185 decimal to binary Can you take 128 from 185? Yes. Put 1 under 128 What is left? 185-128 = 57
17
17 08/08/2015SW Abingdon and Witney College Convert decimal to binary Position87654321 Value1286432168421 Binary1 Check Converting 185: we have 57 left Can you take 64 from 57? No. Put 0 under 64 What is left? Still 57
18
18 08/08/2015SW Abingdon and Witney College Convert decimal to binary Position87654321 Value1286432168421 Binary10 Check Converting 185: we have 57 left Can you take 32 from 57? Yes. Put 1 under 32 What is left? 57 – 32 = 25
19
19 08/08/2015SW Abingdon and Witney College Convert decimal to binary Position87654321 Value1286432168421 Binary101 Check Converting 185: we have 25 left Can you take 16 from 25? Yes. Put 1 under 16 What is left? 25 – 16 = 9
20
20 08/08/2015SW Abingdon and Witney College Convert decimal to binary Position87654321 Value1286432168421 Binary1011 Check Converting 185: we have 9 left Can you take 8 from 9? Yes. Put 1 under 8 What is left? 9 – 8 = 1
21
21 08/08/2015SW Abingdon and Witney College Convert decimal to binary Position87654321 Value1286432168421 Binary10111 Check Converting 185: we have 1 left Can you take 4 from 1? No. Put 0 under 4 What is left? Still 1
22
22 08/08/2015SW Abingdon and Witney College Convert decimal to binary Position87654321 Value1286432168421 Binary101110 Check Converting 185: we have 1 left Can you take 2 from 1? No. Put 0 under 2 What is left? Still 1
23
23 08/08/2015SW Abingdon and Witney College Convert decimal to binary Position87654321 Value1286432168421 Binary1011100 Check Converting 185: we have 1 left Can you take 1 from 1? Yes. Put 1 under 1 What is left? Nothing. Finished.
24
24 08/08/2015SW Abingdon and Witney College Convert decimal to binary Position87654321 Value1286432168421 Binary10111001 Check 185 decimal is 10111001 binary
25
25 08/08/2015SW Abingdon and Witney College Convert decimal to binary Position87654321 Value1286432168421 Binary10111001 Check128321681 Check: write in the values of the1 digits and add them up 128 + 32 + 16 + 8 + 1 = 185 That’s the number we started with. It’s correct.
26
26 08/08/2015SW Abingdon and Witney College One for you to try Convert 248 from decimal to binary Check your answer Position87654321 Value1286432168421 Binary Check
27
27 12/08/03SW Abingdon and Witney College End
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.