770 likes | 1.83k Views
Binary and other number bases. Base Ten. This is what we are accustomed to. Digits go from 0 – 9 Headings are represented by powers of ten. Other number bases. Bases two - Binary Base five - Q uinary Base eight - Octal Base sixteen - Hexadecimal Bases are named for their “headings.”.
E N D
Base Ten • This is what we are accustomed to. • Digits go from 0 – 9 • Headings are represented by powers of ten
Other number bases • Bases two - Binary • Base five - Quinary • Base eight - Octal • Base sixteen - Hexadecimal • Bases are named for their “headings.”
Base Two • Uses only 1’s and 0’s • Headings are in powers of two Headings Binary number
Base Two – converting to decimal Question: Convert 10011002 to a decimal (base ten) number Answer: Headings Binary number = 64 + 8 + 4 = 76
Base Eight • Uses digits from 1 to 7 • Headings are in powers of eights Headings Binary number
Base Eight – converting to decimal Question: Convert 1368 to a decimal (base ten) number Answer: Headings Binary number = 64 + 24 + 6 = 94
Base Sixteen • Uses digits from 1 to 9, and letters from A to F (10 to 15) • Headings are in powers of 16’s Headings Binary number
Base Eight – converting to decimal Question: Convert 2B16 to a decimal (base ten) number Answer: Headings Binary number = 32 + 11 = 43
Review: Binary to Decimal • https://www.youtube.com/watch?v=UUqtjb8WEUs New: Converting a decimal to binary • https://www.youtube.com/watch?v=qWxiXU02ZQM
Binary addition • Basic rules 1 and carry 1 0 and carry 1
Binary addition example Carry’s Answer
Binary addition video • https://www.youtube.com/watch?v=Cqs90dhw_E4
Other binary • BCD – Binary Coded Decimal • Every digit of a number is represented using its 4-bit binary equivalent • The number is not “converted,” instead each digit is given a “code”
0 = 0000 • 1 = 0001 • 2 = 0010 • 3 = 0011 • 4 = 0100 • 5 = 0101 • 6 = 0110 • 7 = 0111 • 8 = 1000 • 9 = 1001 4 digit codes A negative sign is represented by 1011
BCD exampl • Convert 473 to binary coded decimal • Answer: 4 7 3 = 0100 0111 0011 We can separate the answer by spaces
BCD example 2 • Convert -93 to SIGNED BCD • Answer: - 9 3 = 1111 1001 0011
Try this! • What number does BCD 0101 1001 0001 represent? • Answer: 0101 1001 0001 = 5 9 1 Answer: 591