Unit 2 - Chapter 4 Flashcards
External Representation
the way information is represented by humans and the way it is entered at a keyboard or displayed on a printer or screen.
Internal Representation
the way information is stored in the memory of a computer
Binary Numbering System
Binary is a base-2 positional numbering system. There are only two digits, 0 and 1, and the value of the positions in a binary number is based on powers of 2.
Maximum number of binary digits that can be used
Typically this value is 16,32, or 64 bits.
Arithmetic overflow
An attempt to represent an integer that exceeds the maximum allowable value.
Computer Science
Must del with a finite and sometimes quite limited set of possible representations and it must handle the errors that occur when those limits are exceeded.
Signed numbers
To represent signed integers ( in binary) we can use the left most bit of a number to represent a sign, with 0 meaning positive ( +) and 1 meaning negative ( - ). This form of signed integer representation is termed => signed/ magnitude notation, and it is one of a number of different techniques for representing positive and negative whole numbers. Disadvantage => This technique causes the issue of + 0 / - 0
The meaning of a binary number stored in memory
is based solely on the context in which it is used. The context determines the meaning of a binary string.
Two’s complement representation
The positive numbers begin at 000…and proceed in order around the circle to the right, Negative numbers begin at 111 and proceed in order around the circle to the left. The leftmost digit specifies whether the number is to be given a positive interpretation ( leftmost bit = 0 ) or a negative interpretation ( left most bit = 1 ) ====»> there is only one single zero, the binary number 000… DISADVANTAGE: you can always represent one more negative number than positive
Fractional Numbers
To represent fractions in binary you must first convert the number to scientific notation. +-M x B +-E
M = Mantissa
B= exponent base
E = exponent
** The mantissa ( or significand or coefficient) is part of a number consisting of its significant digits
For example:
0.6259 x 10 to the power of 3
0.6259 is significant
10 is the base
3 is the exponent
In a floating point number the first bit is the sign ( + or - ) the net bits are for the exponent and the rest is for the significand.
Textual Information
To represent textual material in binary, the system assigns each printable letter or symbol in our alphabet a unique number, and then stores that symbol internally using the binary equivalent of that number.
ASCII
Currently, the most widely used code for representing characters internally in a computer system is called ASCII, an acronym for the American Standard Code for information exchange. ASCII is an international standard for representing textual information in the majority of computers. It uses 8 bits to represent each character, so it is able to encode a total of 2 to the power of 8 or 256 different characters . These are assigned the integer values 0 to 255.
Unicode
a code set that has gained popularity because it uses 16-bit representation for characters. This means it is able to represent 2 to the power of 16 = 65,536 unique characters. This is especially important for representing emojis and characters other than English.
Analog Representation
objects can take on any value. Amplitude => loudness => the greater the amplitude the louder the sound. => the Period of the wave designated as T is the time is takes for the wave to make one complete cycle. => The frequency is the total number of cycles per unit measured in cycles/second, also called hertz and defined as f= 1/T
***** The frequency is a measure of pitch, the highness or loudness of a sound. The higher the frequency, the higher the perceived tone.
===»> Human ear can generally detect sounds in the range of 20 to 20,000 hertz.
To store a waveform in a computer
the analog signal must first be digitized, that is, converted to a digital representation.
sampling
At fixed time intervals, the amplitude of the signal is measured and stored as an integer value. The wave is thus represented in digital form as a sequence of sampled numerical amplitude.