1 number systems-binary
Transcript of 1 number systems-binary
A Bit About Bits
A bit (binary digit)
– is the smallest unit of information
– can have two values 1 and 0.
Binary digits, or bits, can represent numbers, codes, or instructions.
On Off
Bits as Numbers
Binary number system -a system that denotes all numbers and combinations of two digits.
The binary system uses two digits to represent the numbers, 0 and 1.
Bits, Bytes, and Buzzwords
Common terms might describe file size or memory size:
Bit: smallest unit of information
Byte: a grouping of eight bits of information
KB: (kilobyte); about 1,000 bytes of information - technically 1024 bytes equals 1K of storage.
Bits, Bytes, and Buzzwords
MB: (megabyte); about 1 million bytes of information
GB: (gigabyte); about 1 billion bytes of information
TB: (terabyte); about 1 million megabytes of information
Decimal number system
• Ten digits : 0,1,2,3,4,5,6,7,8,9
• Every digit position has a weight which is a power of 10.
• Base or radix is 10.
Binary number system
Two digits : 0,1
Every digit position has a weight which is a power of 2.
Base or radix is 2.
Decimal Number
• 136.25 : What does this number actually mean ?
102 * 1 = 100.0
101 * 3 = 30.0
100 * 6 = 6.0
10-1 * 2 = 0.2
10-2 * 5 = 0.05
Binary Number
• 1101.01: What does this number mean?
23 * 1 = 1000.0 (8 in decimal)
22 * 1 = 100.0 (4 in decimal)
21 * 0 = 00.0 (0 in decimal)
20 * 1 = 1.0 (1 in decimal)
2-1 * 0 = 0.0 (0.0 in decimal)
2-2 * 1 = 0.01 (0.25 in decimal)
First integers and their binary equivalent
decimal binary
0 0000 (0*23 + 0*22 + 0*21 + 0*20)
1 0001 (0*23 + 0*22 + 0*21 + 1*20)
2 0010 (0*23 + 0*22 + 1*21 + 0*20)
3 0011 (0*23 + 0*22 + 1*21 + 1*20)
4 0100 (0*23 + 1*22 + 0*21 + 0*20)
5 0101 (0*23 + 1*22 + 0*21 + 1*20)
6 0110 (0*23 + 1*22 + 1*21 + 0*20)
7 0111 (0*23 + 1*22 + 1*21 + 1*20)
8 1000 (1*23 + 0*22 + 0*21 + 0*20)
9 1001 (1*23 + 0*22 + 0*21 + 1*20)
Decimal (base 10)
• Uses positional representation
• Each digit corresponds to a power of 10 based on its position in the number
• The powers of 10 increment from 0, 1, 2, etc. as you move right to left
1,479 = 1 * 103 + 4 * 102 + 7 * 101 + 9 * 100
Binary (base 2)
• Two digits: 0, 1
• To make the binary numbers more readable, the digits are often put in groups of 41010 = 1 * 23 + 0 * 22 + 1 * 21 + 0 * 20
= 8 + 2 = 10
1100 1001
= 1 * 27 + 1 * 26 + 1 * 23 + 1 * 20
= 128 + 64 + 8 + 1 = 201