Chp 1) Binary Systems and Hexadecimals - CS

Binary

The binary number system is base 2, using only bits 0 and 1.

What is 11101110 in denary

128 + 64 + 32 + 8 + 4 + 2 = 238(denary)

What is a binary digit commonly referred to?

a bit

Denary/Decimal

the base-10 number system, probably the most commonly used number system. (numbers 0-9)

Convert 107 to binary

01101011

What is a byte?

8 bits

What is a nibble?

4 bits

Number of bytes in 1 kilobyte (KB)

1024 bytes (2^10)

Number of bytes in 1 megabyte (MB)

1048576 bytes (2^20)

Number of bytes in 1 petabyte (PB)

1125899906842624 bytes (2^50)

Number of bytes in 1 gigabyte (GB)

1073741824 bytes (2^30)

Number of bytes in 1 terabyte (TB)

1099511627776 bytes (2^40)

Example use of binary

8 - bit register is can be used to control movement of the wheels on a robot vacuum cleaner

Hexadecimal

A base-16 number system that uses sixteen distinct symbols 0-9 and A-F to represent numbers from 0 to 15.

Convert 1011 1110 0001 to Hexadecimal

BE1

What is binary 0000 in denary

0

What is binary 0001 in hexadecimal

1

What is binary 0001 in denary

1

What is binary 0011 in denary

3

What is binary 0010 in hexadecimal

2

What is binary 0101 in denary

5

What is binary 0010 in denary

2

What is binary 0011 in in hexadecimal

3

What is binary 0111 in hexadecimal

7

What is binary 0100 in Hexadecimal

4

What is binary 0100 in denary

4

What is binary 0101 in Hexadecimal

5

What is binary 0110 in hexadecimal

6

What is binary 0110 in denary

6

What is binary 0111 in denary

7

What is binary 1000 in hexadecimal

8

What is binary 1000 in denary

8

What is binary 1001 in hexadecimal

9

What is binary 1001 in denary

9

What is binary 1010 in hexadecimal

10

What is binary 1010 in denary

A

What is binary 1011 in hexadecimal

B

What is binary 1011 in denary

11

What is binary 1100 in hexadecimal

C

What is binary 1100 in denary

12

What is binary 1101 in hexadecimal

D

What is binary 1101 in denary

13

What is binary 1110 in hexadecimal

E

What is binary 1110 in denary

14

What is binary 1111 in hexadecimal

F

What is binary 1111 in denary

15

Covert hexadecimal 45A to binary

0100 0101 1010

Convert hexadecimal C8F to denary

(256 x 12) + (16 x 8) + (1 x 15) = 3215

5 uses of hexadecimal system

1. Memory dumps
2. Hyper Text Mark-up Language (HTML)
3. Media Access Control (MAC)
4. Web addresses
5. Assembly code and machine code

Memory Dump

Output of memory contents onto the printer or screen. Usually represented in hexadecimal.

HTML (Hypertext Markup Language)

the written code that creates Web pages and links; a language all computers can read

What is HTML often used to represent

colours of text by change of values
e.g.
# FF 00 00 represents primary colour red

Media Access Control (MAC)

MAC address refers to the network interface card (NIC) which is part of the device. MAC address is usually made up of 48 bits which are shown as six groups of hexadecimals digit.

Types of MAC address

1. Universally Administered MAC address (UAA)
2. Locally Administered MAC address (LAA)

web address

the address of a web page on the world wide web. Also called a URL

Example use of ASCII

Use of ASCII is the representation of a web address such as www.hodder.co.uk

ASCII (American Standard Code for Information Interchange)

ASCII are codes that can be represented using hexadecimals or decimal values.

Why is hexadecimal used in assembly code and machine code

-Easier
-Faster
-Less prone to error

What is machine code a assembly code

they are low-level languages and are use by software developers when producing, for example, video games