Download presentation
Presentation is loading. Please wait.
1
Binary System
2
Bits, Bytes Common terms might describe file size or memory size:
Bit: smallest unit of information Byte: a grouping of eight bits of information K: (kilobyte); 1024 bytes equals 1K of storage.
3
Bits, Bytes MB: (megabyte); about 1 million bytes of information
GB: (gigabyte); about 1 billion bytes of information TB: (terabyte); about 1 million megabytes of information
4
Decimal System Numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... Use 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 We know that 5304 = 5*103+3*102+0*101+4*100 Base 10
5
Binary System BINARY numbers:
0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, .... Written with only 2 digits: "0" and "1" In the same way as for decimal, 1011 (binary) = 1*23+0*22+1*21+1*20= 11 (decimal) Base 2 Converting from binary to decimal is simple, just as for 1011 above.
6
Binary System How to know if 1011 is in binary or in decimal? Subscripts are used to show the base: (binary number), (decimal number)
7
Positive Binary Integers
Decimal Binary 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 10 1010 11 1011
8
Decimal ÷ 2 * 2 Binary
9
Example 1 Convert Decimal to binary
(35) = ( … )2 (110001)2 35 ÷2 1 17 ÷2 1 8 ÷2 4 ÷2 2 ÷2 1 ÷2 1 NO
10
Example 2 Convert Decimal to binary
(45) = ( … )2 (101101)2 45 ÷2 1 22 ÷2 11 ÷2 1 5 ÷2 1 2 ÷2 1 ÷2 1 NO
11
Example 3 Convert Decimal to binary
(55) = ( … )2 (110111)2 55 ÷2 1 27 ÷2 1 13 ÷2 1 6 ÷2 3 ÷2 1 1 ÷2 1 NO
12
Example 4 Convert Decimal to binary
(72) = ( … )2 ( )2 72 ÷2 36 ÷2 18 ÷2 9 ÷2 1 4 ÷2 2 ÷2 1 ÷2 1 NO
13
Example 5 Convert Decimal to binary
(85) = ( … )2 ( )2 85 ÷2 1 42 ÷2 21 ÷2 1 10 ÷2 5 ÷2 1 2 ÷2 1 ÷2 1 NO
14
1*20+0*21+1*22+0*23+0*24+1*25 = 37 Example 6 convert binary to decimal
( )2 = (….)10 1*20+0*21+1*22+0*23+0*24+1*25 = 37
15
1*20+0*21+1*22+1*23+1*24+1*25 = 61 Example 7 convert binary to decimal
( )2 = (….)10 1*20+0*21+1*22+1*23+1*24+1*25 = 61
16
1*20+1*21+1*22+1*23+1*24+1*25 = 63 Example 8 convert binary to decimal
( )2 = (….)10 1*20+1*21+1*22+1*23+1*24+1*25 = 63
17
Example 9 convert binary to decimal
( )2 = (….)10 0*20+0*21+0*22+0*23+0*24+1*25+1*22 = 96
18
Example 10 convert binary to decimal
( )2 = (….)10 1*20+0*21+0*22+1*23+0*24+1*25+1*22 = 105
19
Example 11 Convert decimal fraction into binary
(0.125) = ( … )2 .001 integer 0.125 * 2 0.250 2 0.250 * 0.50 2 1 0.50 * 1
20
Example 12 Convert decimal fraction into binary
(0.0625) = ( … )2 .0001 integer 0.0625 * 2 0.1250 2 0.1250 * 0.2500 2 0.2500 * 0.5000 0.5000 1 * 2 1
21
Example 13 Convert decimal fraction into binary
( ) = ( … )2 .00001 integer * 2 2 * 2 * * 2 0.5000 0.5000 * 2 1 1
22
0*2-1 + 0*2-2 +0*2-3+ 1*2-4 = 1/16 =0.0625 ( .0001)2 = (….)10 0.0625
Example 14 convert fraction binary to decimal ( .0001)2 = (….)10 0.0625 0* *2-2 +0*2-3+ 1*2-4 = 1/16 =0.0625
23
Example 15 convert fraction binary to decimal
( .0011)2 = (….)10 0.0625 0* *2-2 +1*2-3+ 1*2-4
24
Example 16 Convert decimal into binary
(35.125) = ( … )2 integer 1 35 2 0.125 *2 0.250 1 17 2 0.250 *2 0.50 8 2 0.50 *2 1 1 4 2 2 2 1 1 2 .001 NO 100011
25
Example 17 Convert decimal into binary
(42.125) = ( … )2 integer 42 2 0.125 *2 0.250 1 21 2 0.250 *2 0.50 10 2 0.50 *2 1 1 1 5 2 2 2 1 1 2 .001 NO 101010
26
Example 18 Convert decimal into binary
(39.125) = ( … )2 integer 1 39 2 0.125 *2 0.250 1 19 2 0.250 *2 0.50 1 9 2 0.50 *2 1 1 4 2 2 2 1 1 2 .001 NO 101010
27
Addition 1 + 0 = 1 0 + 1 = 1 0 + 0 = 0 1 + 1 = carry 1
28
Example 19 1 11000 100100
29
Example 20 1 11000 110100
30
Example 21 1 1 1
31
Example 22 1 1 1
32
Example 23 1 1 1
33
Subtraction 1 - 1 = 0 1 - 0 = 1 0 - 0 = 0 0 - 1 = 1 borrow 1
34
Ex 24 borrow 1 11000 1100
35
Ex 25 borrow 1
36
Ex 26 borrow 1 11110 10001
37
Ex 27 borrow 1
38
Multiplication 1 * 0 = 0 0 * 1 = 0 0 * 0 = 0 1 * 1 = 1
39
Example 28 11000 * 00000
40
Example 29 11111 *
41
Example 30 1101.1 * 11011 00000
42
Example 31 11111 * 00000
43
Example 32 11.1 * 111
44
1- Convert Decimal to binary
Exercises 1- Convert Decimal to binary (25) = ( … )2 (80) = ( … )2 (59.125) = ( … )2 ( ) = ( … )2 (125) = ( … )2
45
2- Convert binary to Decimal
Exercises 2- Convert binary to Decimal (…..) = ( 0.01)2 (…..) = ( 0.001)2 (…..) = ( )2 (….) = ( 0.1)2
46
3- Convert Decimal to binary
Exercises 3- Convert Decimal to binary (0.125) = ( … )2 (0.0625) = ( … )2 ( ) = ( … )2 (0.5) = ( … )2
47
Exercises 4- binary addition 11011 + 111 1111001 + 111111
48
5- binary multiplication
Exercises 5- binary multiplication 11011 * 111 * 1001 * 1001 0.101 * 0.01 *
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.