Data Types / Binary Flashcards

1
Q

primitive data type

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

types of primitive data types (5)

A

integer
real/float
boolean
character
string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

denary

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

binary

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

hexadecimals

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

why use hexadecimal?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

uses of hex

A

define colours
in MAC addresses
in assembly language and machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

integer

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

real (floating point)

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

character

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

string

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Boolean

A

Any true/ false data types which often represent logical situations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Sign magnitude most significant bit

A

represents + or -
+ = negative
- = positive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

0.1

A

positive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

1.0

A

Negative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

fixed point binary

A

positive of the binary point is fixed on the number line

17
Q

by changing the position of the binary point you can…

A

increase the size of the number

increase the accuracy of the number

18
Q

mantissa

A

the actual number you want to store

19
Q

exponent

A

positive of the binary point is fixed on the number line

20
Q

how to convert floating point binary to denary

A

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
Q

Binary -> denary positive exponent

A

Right

22
Q

Binary -> denary negative exponent

A

Left

23
Q

in two’s complement the sign is stored in

A

the most significant bit

24
Q

normalising a number

A

means that there is only one way to represent the number

25
Q

advantage of normalisation

A

it stores the most accurate version of that number.

26
Q
A