Data Types / Binary Flashcards Preview

A-Level Computer Science OCR > Data Types / Binary > Flashcards

Flashcards in Data Types / Binary Deck (61)
Loading flashcards...
1

primitive data type

a basic data type provided by the programming language as a basic building block

2

types of primitive data types (5)

- integer
- real/float
- boolean
- character
- string

3

denary

base 10 number. uses the combination of ten symbols to represent any number

4

binary

base 2 number. uses the combination of 2 symbols (0 or 1) to represent every number

5

hexadecimal

based 16 number. uses the combination of 16 symbols (10 numbers and 6 letters) to represent every number

6

why use hexadecimal?

- easier to read/ remember
- quicker to write/type
- less chance of making an error
- easy to convert

7

uses of hex

- define colours
- in MAC addresses
- in assembly language and machine code

8

integer

any positive or negative whole number e.g. 3, 0, -14

9

real (floating point)

a positive or negative number with a fractional component e.g. 0.002 or -1.98

10

character

Any single letter, symbol, number, character or control character

11

string

any combination of letters, symbols, numbers, characters or control characters e.g. Hello, £4.56

12

Boolean

Any true/ false data types which often represent logical situations

13

Sign magnitude most significant bit

represents + or -
+ = negative
- = positive

14

0.1

positive

15

1.0

negative

16

fixed point binary

positive of the binary point is fixed on the number line

17

by changing the position of the binary point you can...

increase the size of the number
increase the accuracy of the number

18

mantissa

the actual number you want to store

19

exponent

positive of the binary point is fixed on the number line

20

how to convert floating point binary to denary

1) First work out the denary number in the exponent which tells us that the binary point moves 'n' places to the right
2) Write out a new binary weighting line with the point in the right place and then convert into denary

21

Binary -> denary positive exponent

right

22

Binary -> denary negative exponent

left

23

in two's complement the sign is stored in

the most significant bit

24

normalising a number

means that there is only one way to represent the number

25

advantage of normalisation

it stores the most accurate version of that number.

26

Bitwise manipulation

bitwise shifts and masks

27

Bitwise shifts can be used ...

to change numbers quickly

28

Masks can be used ...

to set and toggle specific bits in a larger sequence.

29

toggle

swap to the opposite

30

What is bitwise manipulation useful for?

- Compression Algorithms
- networks (protocols. routing packets)
- multiplication and division