Chapter 1 - Data Representation Flashcards

1
Q

Data representation

A

Methods used internally to represent information stored in a computer

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

3 main coding systems

A
  • American Standard Coded for Information Interchange (ASCII)
  • Extended Binary Coded Decimal Interchange Code (EBCDIC)
  • Unicode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Binary System

A
  • Computers are digital
    • Only 2 discrete states: 0(off) or 1(on)
    • Each digit is known as a bit (binary digit)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Data representation

A
  • 8 bits -> 1 byte
  • 1 byte can represent 2^8 = 256 pieces of information
  • More bytes - represent numbers, characters, etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Data types

A
  • Vary in
    • Word length - number of bits used
    • Representation
      • Fixed-point - integer or long
      • Floating-point - float or double
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Fixed-point representation

A
  • Used for integer or long numbers
  • 3 systems to represent numbers:
    • Sign-and-magnitude
    • 1’s complement
    • 2’s complement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Sign-and-magnitude

A
  • leftmost bit - sign; remaining bits - magnitude

* Just change the sign bit and keep the magnitude to show the negative value

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

1’s complement

A

• Negative values - complement each bit of the corresponding positive number

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

2’s complement

A

• Negative values - do the 1’s complement first by complement each bit of the corresponding positive number. Add one to the 1’s complement.

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

IEEE

A

Institute of Electrical and Electronic Engineers

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

Floating-point representation

A

• According to the international Institute of Electrical and Electronic Engineers(IEEE), numbers are represented in the normalized form

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

Types of errors

A
  • Mistakes
  • Random error
  • Truncation error
  • Round off error
  • Propagated error
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Mistakes

A

typographical errors entered with program or maybe running the program using the wrong data etc.

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

Random errors

A

caused by random fluctuations in electronics due to for example power surges.

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

Truncation errors

A

Due to simplification of mathematics to make it easy to solve the problem

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

Round off errors

A

Since most numbers are represented with imprecision by computers (and general restrictions), this lead to a number being lost.

17
Q

Propagated errors

A
  • Error in later steps of a program due to an earlier error
  • Critical as errors may be magnified causing results to be invalid
  • Stability of the program determines how errors are propagated
18
Q

Parity bit

A
  • Odd
  • Even

• If a computer uses even parity, the total number of 1-bits should be even. If the total is odd, then there is an error

19
Q

Precision

A
  • Consequence of storage scheme - limit to precision
  • If the mantissa of the numbers are different, the exponent of the smaller number is made larger while the mantissa is made smaller until they are same(shifting bits to right while inserting zeros).