Test 2 Study Guide - College of the Environment, Forestry ...



Test 2 Study GuideCS 200 ? Spring 2015Study Topics Number Base ConversionOther Bases to Decimal (ex. Base 5 to Base 10)Base 10 to Binary, Hexadecimal, and OctalBinary to Octal and HexadecimalOctal to Hex using Binary intermediateRadix point and Fractional conversion (focus on Binary)Data RepresentationIntegersUnsignedSign-Magnitude1s Complement2s ComplementFloating PointExponent with BiasSignificand with implied “1.”IEEE Single (32 bits) and Double (64 bits) precisionFloating Point MathAddition./SubtractionNormalize smaller exponent to match largerUse sign bit to decide sign of result and add or subtract significandNormalize again (if necessary) to store in IEEE formatMultiplication/DivisionUse sign to decide sign of resultAdd (for multiply) or subtract (for divide) exponentsMultiply or divide significandsNormalize (if necessary) to store in IEEE formatCharacter RepresentationBCD: Early IBM 6-bit formatEBCDIC: BDC extended to 8 bitsASCII: Binary code for analog devices (telephone, telegraph)Originally 7 bits extended to 8 bitsUnicode: 16-bit format designed to hold international character setsError DetectionModulo 2 divisionCRC Syndrome from DataUse prime binary divisorAdd digits (0s) to data – one less than digits in divisorModulo 2 division – remainder replaces 0s added to dataCRC detectionModulo 2 division using original prime binary divisorIf remainder 0, remove syndrome digits to get dataIf remainder not 0, data is suspect – ask for retransmitHamming CodeCan detect AND correct errorsParity: count the 1s in a binary stringEven Parity: if the 1s are odd, parity bit = 1, otherwise 0Odd Parity: if the 1s are odd, parity bit = 0, otherwise 18 data bits + 4 parity bits = 12-bit codeword.Create CodewordNumber bits from 1 starting at rightParity bits are at powers of 2 positionsOther positions are combinations of powers of 2Add up all the positions that use a power to get the parity bitEx: Data = 10110111 1 0 1 1 0 1 1 112 11 10 9 8 7 6 5 4 3 2 1 1 1 1 1 1 2 2 2 2 2 = 1 4 4 4 4 8 8 8 8 The positions that contribute to parity bit 2 are in red and add up to an odd number so the (even) parity is 1 and would go in position 2.Decode CodewordTest parity bits as above, mark as correct or incorrectIf all parity bits are correct or only one is incorrect, data is good.If more than one parity bit is incorrect, add positions to find bad bitEx: Bits 4, 2, and 1 are incorrect so position 7 is the bad bit. (4 + 2 + 1 = 7)If outside of possible positions, data cannot be correctedOtherwise, simply flip the bad bit to fix it.If data is correct, strip out the parity bits to get the original data. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download