Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unit 18: Computational Thinking

Similar presentations


Presentation on theme: "Unit 18: Computational Thinking"— Presentation transcript:

1 Unit 18: Computational Thinking
Number systems

2 Bits and bytes A 4 bit number looks like this:
1 bit = a binary digit A 4 bit number looks like this: 1001 How many possible different 4 bit numbers are there? Hint: work out the minimum and maximum in decimal 0000 1111

3 Bits and bytes A 4 bit number has 16 different possible values
It has 2*2*2*2 or 2 to the power 4 combinations 2*2*2*2 = 16 A byte has 8 bits How many different possible combinations?

4 Bytes 2 to the power 8 2*2*2*2*2*2*2*2 = 256 Minimum = 00000000
Maximum = Writing bytes in binary is: Tedious Error-prone

5 Hexadecimal to the rescue!
Makes life easier Now count to 15 using a single digit 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 That was easy – just like decimal! What about 10 and up? 10 = A 14= E 11= B 15= F 12= C 16= 10 (We now need 13= D an extra place value)

6 Hexadecimal

7 Hexadecimal So instead of 4 bits we have 1 hexadecimal digit
8 bits = 2 4 bit sections Convert each to hex Now have 256 = 1 byte = 2 hex digits

8 Conversion to hex Start with decimal number e.g. 36 Convert to binary
= 32 (2*2*2*2*2)+4(2*2) = as binary Split into 2 4-bit sections 0010 and 0100 (written as ) Convert each 4-bit section to hex 0010 = 2, 0100 = 4 36 decimal = binary = 24 hex

9 Try it yourself Convert the following decimal numbers to binary and then to hexadecimal. 34 63 127 244 57 98 Convert the following hexadecimal numbers to binary and then to decimal CC 33 AF 1F 8E FE

10 What about letters then?
ASCII American Standard Code for Information Interchange ITF


Download ppt "Unit 18: Computational Thinking"

Similar presentations


Ads by Google