70 likes | 209 Views
Chapter 16. Binary and Hexadecimal Numbers. § 16 .2 thru 16.3 – Addition and Subtraction of B inary Numbers. Binary = Base 2 Addition and subtraction are similar to base 10 Can be checked using base 10 conversion Will not learn 1’s complement method
E N D
Chapter 16 Binary and Hexadecimal Numbers
§16.2 thru 16.3 – Addition and Subtraction of Binary Numbers • Binary = Base 2 • Addition and subtraction are similar to base 10 • Can be checked using base 10 conversion • Will not learn 1’s complement method • To find 101 – 100011, find 100011 – 101 and make it negative • Not responsible for negative answers
§16.5 – Conversion from decimal to binary • Image on p. 530 provides the following algorithm • Changing a Number from Decimal to Binary • Write the number in decimal form • Divide it by 2 • Write the quotient below and the remainder to the right • Continue this process until final quotient is 0 • The binary form of the decimal number is obtained by reading the remainders from the bottom to the top
§16.7 – Hexadecimal System • Hexadecimal = Base 16 • 16 ‘digits’ are needed: 0, 1, 2, 3, 4, ,5, 6, 7, 8, 9, A, B, C, D, E, F • Expanded form and converting to decimal • Converting Decimal to Hexadecimal (image p. 533) • Write the number in decimal form • Divide it by 16 • Write the quotient below and the remainder to the right • Continue this process until final quotient is 0 • The hexadecimal form of the decimal number is obtained by reading the remainders from the bottom to the top
§16.8 – Addition and Subtraction of HexadecimalNumbers • Addition and subtraction are similar to base 10 • Can be checked using base 10 conversion • Will not learn complementary pairs method • To find AD – 1231, find 1231 – AD and make it negative • Not responsible for negative answers
§16.9 – Binary to Hexadecimal Conversion • One way to convert Binary to Hex • Binary to Decimal to Hex • Shortcut exists because 24 = 16 • Every 4 digits in binary equate to one digit in hex • Convert binary to hex • Convert hex to binary
§16.10 – Hexadecimal Code for colors • Colors in computers are stored in hex • Primary colors: Red, Green, Blue • Red: FF0000 • Green: 00FF00 • Blue: 0000FF • Colors can be made with different ‘quantities’ of Red, Green, and Blue