1.4.1 Data Types

studied byStudied by 1 person
0.0(0)
Get a hint
Hint

Integer

1 / 11

flashcard set

Earn XP

12 Terms

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

Explore top notes

note Note
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 4 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 16 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 71 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 28 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 71 people
Updated ... ago
5.0 Stars(1)

Explore top flashcards

flashcards Flashcard23 terms
studied byStudied by 4 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard744 terms
studied byStudied by 13 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard42 terms
studied byStudied by 256 people
Updated ... ago
4.8 Stars(5)
flashcards Flashcard177 terms
studied byStudied by 507 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard103 terms
studied byStudied by 7 people
Updated ... ago
5.0 Stars(3)
flashcards Flashcard48 terms
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard72 terms
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard44 terms
studied byStudied by 65 people
Updated ... ago
5.0 Stars(4)