Character Codes
- BCD
- Binary Coded Decimal
- Probably should have been in the prevous section
- Use 4 bits for each digit, encode only as decimal
- 458 = 0100 0101 1000BCD
- Special codes 1100BCD = +
- Special codes 1101BCD = -
- EBCDIC
- Old IBM character code
- Extended Binary Coded Decimal Interchange Code
- Had holes between i-j, r-s (i++ is not j)
- Yuck
- ASCII
- 7 bit code, one parity bit fits a byte
- IBM with the pc used extra bit for more characters
- 1000001 = A, 110001 = a (add 20 hex)
- Parity
- Even - count the 1's and add one more if we need to make the count even.
- Odd - count the 1s and add one more if we need to make the count odd.
- Unicode
- 16 bit (65536 possible) code.
- Internationalize things.
- 000000000ASCII
Transmitting Data
- Transmitting data is less stable than storing data in memory
- Distortions due to
- Media
- Electronics
- The Sun
- Timing of the signal will drift, so we need to build a clock into the
signal (ie both systems don't know the lenght of a pulse)
- It actually may be hard to detect what is positive and what is negative
- Some coding forms have been developed to deal with this.
- A simple example
- The word Dan is 44616E (0100 0100 0110 0001 0110 1110)
- It might be encoded as follows
-
- This is called Non-Return-to-Zero, (NRZ)
- 1 is +3 to +5 volts
- 0 is -3 to -5 volts
- Bits are represented directly
- The problem is judging the lenght of each bit, no clock is
carried by this signal
-
- This means if the clocks get out of sync, for example the
receiver counts the 6 (0110) as a (0101), ie merges the two 1 bits, we are lost. (And can't recover)
- Non-Return-to-Zero-Invert encoding (NRZI)
- Each time a 1 is encountered transition from low to
high or high to low.
- This provides a clock pulse on a 1.
-
- We still have a problem with sync on the 0 bits, but not on
the 1 bits.
- Phase Modulation or Manchester (PM)
- Each bit does a transistion,
- 1 go from low to high
- 0 go from high to low
- There is a transition in the middle of every bit.
-
- Unfortunately, it requires double the bit rate 11 -> 0101
- Frequency Modulation (FM)
- Like PM
- Transition in the middle of a 1,
- Transition at the end of a 0
- Modified Frequency Modulation (MFM)
- Transition in the middle of a 1, at the end of a 0
-
- These are just a few examples, Hilman in 475 will be happy to
help you pick up a few more.
Error Detection/Correction
- Error detection - finding that data transmissitted/stored has an error
- Error correction - fixing that error
- Error detection is much easier than correction
- Parity bits.
- CRC
- Cyclic Redundancy Check
- We add extra information the the message so we can calculate if
the bits are correct.
- Again, see Hillman.