4.1.5
Hexadecimal
Hexadecimal Numbers
Hexadecimal Numbers
Hexadecimal is faster for humans to process than binary. Hexadecimal allows us to find errors more easily. Hexadecimal is used in every computer system.
![Illustrative background for Hexadecimal](https://image-v2.cdn.app.senecalearning.com/2020-04/ca1f1c7b-bdfe-4375-be72-7765b1c6795f/hexadecimal-hex,h_400,q_80,w_640.jpg)
![Illustrative background for Hexadecimal ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-04/ca1f1c7b-bdfe-4375-be72-7765b1c6795f/hexadecimal-hex,h_400,q_80,w_640.jpg)
Hexadecimal
Hexadecimal
- Hexadecimal or hex uses 16 different symbols for each place.
- This means hexadecimal is a base-16 numerical system.
- Hexadecimal uses the digits 0-9, then A-F:
- A = 10 in denary, B = 11 , C = 12, D = 13 and so on.
- Each digit's place value is multiplied by 16 as we move from right to left.
![Illustrative background for Advantages](https://image-v2.cdn.app.senecalearning.com/2018-08/aacaeef8-fc6d-4984-99cc-be44f0b44e55/Hexadecimal-numbers-code-,h_400,q_80,w_640.jpg)
![Illustrative background for Advantages ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-08/aacaeef8-fc6d-4984-99cc-be44f0b44e55/Hexadecimal-numbers-code-,h_400,q_80,w_640.jpg)
Advantages
Advantages
- An 8-bit binary number can be represented by two hexadecimal digits.
- This means you can reduce processing time with hexadecimal than with binary.
- Hex is easier and faster to write two digits than the full binary sequence.
- It is easier for a human to process hexadecimal than binary.
![Illustrative background for Using hexadecimal](https://image-v2.cdn.app.senecalearning.com/2018-08/6f2b13b6-c43f-4553-a7b0-3a5ad8b8b888/programming-1873854_1920,h_400,q_80,w_640.png)
![Illustrative background for Using hexadecimal ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-08/6f2b13b6-c43f-4553-a7b0-3a5ad8b8b888/programming-1873854_1920,h_400,q_80,w_640.png)
Using hexadecimal
Using hexadecimal
- Hexadecimal is used extensively in programming languages such as:
- Machine code.
- Assembly.
- Hex can be used during the debugging stage of writing programs as it is easy to process by humans.
- Hex can represent numbers stored in a CPU's registers or in main memory.
Using Hexadecimal
Using Hexadecimal
Hexadecimal is used in HTML to display colour on websites and to form unique MAC addresses for devices connected to a network.
![Illustrative background for HTML colours](https://image-v2.cdn.app.senecalearning.com/2020-04/bb201f63-c628-4e04-939b-3b94aab633b4/colours,h_400,q_80,w_640.jpg)
![Illustrative background for HTML colours ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-04/bb201f63-c628-4e04-939b-3b94aab633b4/colours,h_400,q_80,w_640.jpg)
HTML colours
HTML colours
- In HTML, colours are defined by how much red, green and blue (RGB) there is on a scale of 0 to 255.
- 0 to 255 is the range of numbers that can be represented as a single byte.
- This means we use 2 hexadecimal digits to represent each RGB value.
- HTML colour codes start with a hash symbol followed by 3 pairs of hexadecimal numbers like #00FF00.
![Illustrative background for HTML colours](https://image-v2.cdn.app.senecalearning.com/2020-04/2dea7ca4-5aab-47ea-951a-4dd31f2f1773/hex-code-min,h_400,q_80,w_640.png)
![Illustrative background for HTML colours ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-04/2dea7ca4-5aab-47ea-951a-4dd31f2f1773/hex-code-min,h_400,q_80,w_640.png)
HTML colours
HTML colours
- We can break down the HTML colour code #00FF00 in the following way:
- The red value is 00, which means we have 0 units of red.
- The green value is FF, so we have 255 units of green.
- The blue value is 00, so we have 0 units of blue.
- The colour code #00FF00 corresponds to a bright green colour.
![Illustrative background for MAC addresses](https://image-v2.cdn.app.senecalearning.com/2018-07/261ca059-41ab-4773-846f-a360106fa668/Wireless-Router-Hub-Wifi-Network-Connection-,h_400,q_80,w_640.jpg)
![Illustrative background for MAC addresses ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-07/261ca059-41ab-4773-846f-a360106fa668/Wireless-Router-Hub-Wifi-Network-Connection-,h_400,q_80,w_640.jpg)
MAC addresses
MAC addresses
- A MAC address is a number that uniquely identifies a networked device.
- A MAC address is made up of 48 bits which are shown as 6 groups of 2 hexadecimal digits:
- NN-NN-NN-DD-DD-DD or NN:NN:NN:DD:DD:DD
- The first 6 hex digits identify the device manufacturer.
- The second 6 hex digits identify the serial number of the device.
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Jump to other topics
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
![Go student ad image](/en-GB/revision-notes/_next/image?url=%2Fen-GB%2Frevision-notes%2Fimages%2Fgo-student-uk-ad.jpg&w=640&q=100)
Unlock your full potential with GoStudent tutoring
Affordable 1:1 tutoring from the comfort of your home
Tutors are matched to your specific learning needs
30+ school subjects covered