1.4.1 Data Types

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

Integers

1 / 18

flashcard set

Earn XP

19 Terms

1

Integers

Whole numbers. Includes zero and negative numbers

New cards
2

Real numbers

Positive or negative numbers which can, but don’t necessarily, have a fractional part

New cards
3

Character

A single symbol used by a computer

New cards
4

String

A collection of characters

New cards
5

Boolean

True or False

New cards
6

Binary addition

  • 0 + 0 = 0

  • 0 + 1 = 1

  • 1 + 1 = 10

  • 1 + 1 + 1 = 11

New cards
7

Sign magnitude binary numbers

The most basic way to represent negative numbers in binary. A leading 1 is added for a negative number, and a leading 0 is added for a positive number

New cards
8

Two’s complement

Much simpler way of representing negative binary numbers. Works by making the most significant bit negative. Converting to a two’s complement negative number is as simple as flipping all the bits in the positive version and adding 1

New cards
9

Subtracting in binary

The same as adding a negative number. Both numbers are converted to two’s complement and then added together. A positive number will begin with a 0 and a negative will begin with a 1

New cards
10

Floating point in binary

A decimal point is added after the rightmost bit of representing 1, and the bits continuing right after half in size each time. E.g. 4 2 1 . 0.5 0.25 0.125

New cards
11

Normalisation

The number is split into two parts: mantissa and exponent. In the case of 6.67×10, the mantissa is 6.67 and the exponent is -11. To normalise, the binary number is adjusted so that it start with 01 for a positive and 10 for a negative. The exponent is added after based on how many shifts in which the direction the number has been adjusted

New cards
12

Addition of normalised numbers

Modify the numbers so that the exponents are the same by manipulating the mantissa. The two mantissas can then be added as normal, making sure the final result is in a properly normalised form

New cards
13

Subtraction of normalised numbers

Works exactly the same as addition except the mantissas are converted to two’s complement

New cards
14

Logical shifts

Involves moving all bits in a binary number a specified number of places to the left or right, adding in additional 0s to the empty spots

New cards
15

Arithmetic shift

The same process as a logical shift, except instead of always filing with 0s, the most significant bit in the direction of shift is copied to fill the gaps

New cards
16

Masks

Can be applied to binary numbers by combining them with a logic gate

New cards
17

Character sets

A published collection of codes and corresponding characters which can be used by computers for representing text

New cards
18

ASCII

The leading character set before Unicode. Uses 7 bits to represent 128 different characters. American Standard Code for Information Interchange. Soon came into trouble when computers needed to represent other languages with different characters

New cards
19

Unicode

Solves the problem of ASCII’s limited character set. Uses a varying number of bits allowing for over 1 million different characters

New cards

Explore top notes

note Note
studied byStudied by 5 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 20 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 11 people
Updated ... ago
4.5 Stars(2)
note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 17229 people
Updated ... ago
4.5 Stars(11)
note Note
studied byStudied by 533 people
Updated ... ago
4.9 Stars(9)

Explore top flashcards

flashcards Flashcard42 terms
studied byStudied by 22 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard166 terms
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard24 terms
studied byStudied by 4 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard108 terms
studied byStudied by 14 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard48 terms
studied byStudied by 289 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard32 terms
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard44 terms
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
flashcards Flashcard94 terms
studied byStudied by 216 people
Updated ... ago
5.0 Stars(3)