1 / 21

Hexadecimal

Hexadecimal. Binary Made Easier. Quick Recap. Two different systems Computers use binary Binary is hard to read What is 1010001010111011??. Middle Ground. Need a system: Easier to read Converts easily to binary. Middle Ground. Need a system: Easier to read Converts easily to binary

faxon
Download Presentation

Hexadecimal

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hexadecimal Binary Made Easier

  2. Quick Recap • Two different systems • Computers use binary • Binary is hard to read • What is 1010001010111011??

  3. Middle Ground • Need a system: • Easier to read • Converts easily to binary

  4. Middle Ground • Need a system: • Easier to read • Converts easily to binary • Hexadecimal – base 16

  5. Hexdecimal • Base 16 • Each column is a power of 16: = 4096 * 2 + 256 * 0 + 16 * 5 + 1 * 9 = 8192 + 80 + 9 205916 = 8281 in decimal

  6. 13? • How do we represent 13???

  7. 16 Values • Each column needs 16 values 0-15 • Use 0-9, A (10), B (11), C (12), D (13), E (14), F (15) = 256 * 1 + 16 * 14 + 1 * 9 = 256 + 224 + 9 = 489

  8. Counting • Equivalent values : 1210 = 11002 = C16

  9. Conversion Among Bases • The possibilities: Decimal Hexadecimal Binary

  10. Hex->Decimal Use a table: Remember that A = 10, B = 11, C = 12, D = 13, E = 14, F = 15

  11. Hex & Binary • Each hex digit = 16 possible values • 4 binary digits = 16 possible values (24) • 1 hex digit = 4 binary digits

  12. Binary -> Hex • Break binary value into groups of 4:1001110100010110

  13. Binary -> Hex • Break binary value into groups of 4:1001110100010110 • Replace each group with 1 hex digit

  14. Binary -> Hex • Break binary value into groups of 4:10011101000101109 D 1 6 • Replace each group with 1 hex digit 10011101000101102 = 9D1616

  15. Hex -> Binary • Replace each hex digit with 4 binarydigits: • Ex:F2 F 21111 0010 F216 = 111100102

  16. Hex->Decimal Use a table: Remember that A = 10, B = 11, C = 12, D = 13, E = 14, F = 15

  17. Decimal -> Hex • Go to binary then to hex OR • Divide by 16, remainder is digit, keep going with quotient • Build right  left • Ex: 455:

  18. Summary • Hex is a bridge: • Easier for us • Still just binary for computers

  19. Colors • Colors can be represented as red, green and blue values • Each color stored as 0-255 http://www.rapidtables.com/web/color/RGB_Color.htm

  20. 0-255 • 0-255 = 256 values • 256 = 28 = 162 • Each color is 8 bits or 2 hex digits • 3 * 8 = 24, hence 24 bit color

  21. Web Colors • Website colors often written in hex #RRGGBB • Two digits for red, two for green, two for blue

More Related