Studied by 1 person

0.0(0)

Get a hint

Hint

1

Integer

Whole number, including zero and negative numbers, without a fractional part

New cards

2

Real

Positive or negative numbers which can have a fractional part, can also be represented using floating point

New cards

3

Character

Single symbol used by a computer, including letters A-Z, 0-9, %^& etc.

New cards

4

String

Collection of characters, useful for storing text and phone numbers starting with 0

New cards

5

Boolean

Values are restricted to True and False, useful for something that can only take 2 values

New cards

6

Binary addition of

1011

+1110^{————}

11001

New cards

7

Sign magnitude

0 means it’s positive, 1 means it’s negative

e.g. 010101101 is 173, but 110101101 is negative

New cards

8

Two’s complement

Makes the most significant bit negative. E.g. for 8 bits, 128 becomes -128. To convert from positive to two’s complement, flip all the bits and add 1. E.g. 00000111 is 7, which flips to 11111000, add 1 is 11111001, so if the most significant is -128, that means its -128 add the rest, which is -7

New cards

9

Two’s complement for subtraction

Convert them both into two’s complement (flip the bits and then add 1), and then add them together as normal.

New cards

10

Decimal to Hexadecimal

0123456789 10 11 12 13 etc.

0123456789 A B C D etc.

New cards

11

Floating point numbers in binary

Think of it as 6.67×10^{-11}

Split into the mantissa and the exponent, where 6.67 is the mantissa and the exponent is -11

New cards

12

New cards