Back to 课程

Computer-Science-A-level-Ocr

0% Complete
0/0 Steps
  1. 3-3-networks
    8 主题
  2. 3-2-databases
    7 主题
  3. 3-1-compression-encryption-and-hashing
    4 主题
  4. 2-5-object-oriented-languages
    7 主题
  5. 2-4-types-of-programming-language
    4 主题
  6. 2-3-software-development
    5 主题
  7. 2-2-applications-generation
    6 主题
  8. 2-1-systems-software
    8 主题
  9. 1-3-input-output-and-storage
    2 主题
  10. 1-2-types-of-processor
    3 主题
  11. 1-1-structure-and-function-of-the-processor
    1 主题
  12. structuring-your-responses
    3 主题
  13. the-exam-papers
    2 主题
  14. 8-2-algorithms-for-the-main-data-structures
    4 主题
  15. 8-1-algorithms
    10 主题
  16. 7-2-computational-methods
    11 主题
  17. 7-1-programming-techniques
    14 主题
  18. 6-5-thinking-concurrently
    2 主题
  19. 6-4-thinking-logically
    2 主题
  20. 6-3-thinking-procedurally
    3 主题
  21. 6-2-thinking-ahead
    1 主题
  22. 6-1-thinking-abstractly
    3 主题
  23. 5-2-moral-and-ethical-issues
    9 主题
  24. 5-1-computing-related-legislation
    4 主题
  25. 4-3-boolean-algebra
    5 主题
  26. 4-2-data-structures
    10 主题
  27. 4-1-data-types
    9 主题
  28. 3-4-web-technologies
    16 主题
课 Progress
0% Complete

Representing Hexadecimal Numbers

What is hexadecimal?

  • Hexadecimal serves as a more human-friendly representation of binary-coded values

  • Hexadecimal is a base-16 number system that consists of:

    • 10 numbers (0-9)

    • 6 letters (A-F)

Why use hexadecimal instead of binary?

  • It is more concise as four binary bits (e.g. 1010) can be represented with one hexadecimal character (e.g. A)

  • It is easier for humans to read and write

  • it is less prone to error as it is more likely to be communicated correctly

Potential uses of hexadecimal

  • It is commonly used for debugging, configuring hardware devices, and in cryptographic algorithms

  • It also also commonly used to define colours. As there are millions of colours in the visual spectrum that require very large binary numbers to represent them, they can be replaced with shorter hexadecimal values

hexcolours

Sample hexcolours 

Hexadecimal Lookup Table

  • The hexadecimal lookup table serves as a quick reference for converting numbers between denary, binary and hexadecimal values

  • The hexadecimal scale is identical to the denary scale until the tens column is introduced

  • When the denary scale reaches 10, this is when the hexadecimal scale switches to letters, starting with A

Denary

Binary

Hexadecimal

0

0000

0

1

0001

1

2

0010

2

3

0011

3

4

0100

4

5

0101

5

6

0110

6

7

0111

7

8

1000

8

9

1001

9

10

1010

A

11

1011

B

12

1100

C

13

1101

D

14

1110

E

15

1111

F

Using subscript in number representation

  • The subscript in number representation denotes the base of a number

  • It helps in differentiating between number systems

  • Common uses:

    • 1 0 subscript 2 indicates the number is in binary (base 2), and its value is ’10’ in binary

    • 1 0 subscript 10​ indicates the number is in denary (base 10), and its value is ’10’ in denary

    • 1 0 subscript 16​ indicates the number is in hexadecimal (base 16), and its value is ’10’ in hex, equivalent to ’16’ in denary

  • It provides clarity, especially in contexts where multiple numbering systems are discussed

Denary to Hexadecimal

Convert the denary number 241 to hexadecimal.

Step 1: Convert the number to binary

number to binary

Step 2: Split the binary number into nibbles

binary number to nibbles

Step 3: Convert each nibble into its hexadecimal value

nibbles to hexadecimal values

Step 4: Final result

The denary number 241 is F1 in hexadecimal. 

Hexadecimal to Denary

Convert the hexadecimal value 1A to denary. 

Step 1: Convert each hexadecimal character into binary

<img alt=”hexadecimal character to binary” class=”ContentBlock_figure__vJw2q” data-nimg=”1″ decoding=”async” height=”172″ loading=”lazy” sizes=”(max-width: 320px) 320w, (max-width: 640px) 640w, (max-width: 960px) 960w, (max-width: 1280px) 1280w, 1920w” src=”https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=3840/https://cdn.savemyexams.com/uploads/2024/04/screenshot-2024-04-01-at-9-02-46-pm.png” srcset=”https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=16/https://cdn.savemyexams.com/uploads/2024/04/screenshot-2024-04-01-at-

Responses

您的邮箱地址不会被公开。 必填项已用 * 标注