Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

Normal Size Small Size show me how

Normal Size Small Size show me how

# WJEC CG3.3

### Topic 3: Data Representation, type and Structures

Question | Answer |
---|---|

Logical shift | 0 is shifted in |

Arithmetic shift | the sign is preserved. Multiplication effect if shifted to the left, division effect if shifted to the right. |

Queue (application) | a printer queue, a keyboard buffer; a download buffer; a processor scheduling queue |

Floating point form (advantage) | Greater range of (positive/negative) numbers can be stored in the same number of bits |

Problems of Floating point | Are not normally stored completely accurately; require more complex processing; no exact representation of zero |

Floating point form (convert 18.5) | 0100 1010 0000 0101, 18 -> 10010, .5 -> .1 |

ASCII (advantage) | enables computer (systems) to communicate with each other easily; use of (mainly) just one code avoids confusion |

Binary Tree (unbalanced) | Access times would increase / it would be slower. |

Hexadecimal to binary | The binary number can be split into groups of 4 digits/bits then each group converted to hexadecimal representation. 01011110 0101 1110 5E 1 |

Data structure | is a group / set / collection of related data items / elements. Examples: stack; queue; array; linked list; binary tree; string; record. |

Stack (application) | could be subprogram return addresses (also undo / back, etc). The idea of winding back nesting of subprograms |

Two’s Complement | Understand and apply the concept i.e. -1910 is 111011012 (using 8 bits) From RHS, rewrite it up to and including the first one; Change other 1 digits to 0 and 0 digits to 1; Correct working and answer for example 00001000 -> xxxx1000 -> 11111000 1 |

Linked List (Description) | A linked list is a set of data elements, where each element contains the data itself, and a pointer to the next element. |

Linked List (Benefits) | New items can be inserted into a linked list without rearranging all the other elements; If programmed dynamically uses memory more efficiently. |

Linked Lists (Drawback) | A linked list is more complex to program / manipulate than an array; Extra programming is required to access the data in the opposite direction (or the list needs to be doubly linked); Can only be accessed in a linear manner. |

Rounding | number is approximated to nearest whole number/tenth/hundredth, etc. |

Truncating | number is approximated to whole number/tenth/hundredth, etc. nearer zero i.e for instance 34.7 rounded to nearest whole number is 35. 34.7 truncated to whole number is 34. |

Rounding vs Truncating | In many cases, rounding tends to give an answer closer to the original number than truncating. |

Rounding/Truncating (problems) | a test for equality might fail if a minor difference is caused by rounding; in some applications a high level of accuracy is vital and rounding may reduce this accuracy. |

Array | is a set of data elements of the same type; has its elements accessed via index(es), subscript(s), row/column names; has a fixed/pre-determined number of elements. |

Record | A record is a set of data items all related to a single individual / entity etc; It can contain data of different types. |

Floating Point (Convert 22.75), Man(16), Exp(4) | 01011011000000000101 |

Floating Point (Convert 24.25), Man(12), Exp(4) | 011000010000 0101 |

Sign/Magnitude (1000000000001001) | -9 |

ASCII character set | enables computer (systems) to communicate with each other easily; use of (mainly) just one code avoids confusion. |

Overflow | occurs when the number is too large to be stored (satisfactorily) by the computer. |

Underflow | occurs when the number is very close to zero (Condone too small) to be stored (satisfactorily) by the computer. |

Created by:
mcounsell