1 / 50

Data Representation – 6 hours

Data Representation – 6 hours. Positive binary numbers and range up to 32-bits. xx. Data Representation. Conversion from binary to decimal. Convert binary to decimal Write place headings Write binary number Total headings where 1 present (ignore 0s). Place headings. Data Representation.

britany
Download Presentation

Data Representation – 6 hours

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Representation – 6 hours Higher Computing

  2. Positive binary numbers and range up to 32-bits xx Data Representation Higher Computing

  3. Conversion from binary to decimal • Convert binary to decimal • Write place headings • Write binary number • Total headings where 1 present (ignore 0s) Place headings Data Representation Binary number => 64 + 16 + 8 + 4 + 1 = 93 Binary 0101 1101 is Decimal 93 Higher Computing

  4. Negative numbers using Two’s Complement (8-bits) xx Data Representation Higher Computing

  5. Floating point representation Here is a fractional binary number… 1 1 0 1 . 0 0 1 1 0 1 1 1 0 0 1 0 Binary point Rule: Move the point in front of the digits. So the same number could be written as.. Data Representation . 1 1 0 1 0 0 1 1 0 1 1 1 0 0 1 0 x 2 00000100 Mantissa Exponent Higher Computing

  6. Mantissa Exponent Range and precision of floating point numbers And the same number would be stored in memory as… Data Representation • Therefore… • The mantissa stores the actual digits of the number. Increasing the number of bits increases the precision (accuracy) of the number. • The exponent stores the number of places the point has been moved. Increasing the number of bits increases the range of numbers that can be stored. Higher Computing

  7. Conversion to and from bits, bytes, KB, Mb, Gb and Tb Memory is organised into groups of bytes and large files sizes are represented as powers of 2. Data Representation These measurements are used in memory (e.g. RAM) and backing storage (e.g. hard disc, DVD etc.) Higher Computing

  8. American standard Code for Information Interchange (ASCII) To represent text a unique 7 or 8 bit binary code is used for each character on the keyboard. Note the leftmost bit is always 0, hence only 7-bits used in StandardASCII. The ‘eighth bit’ increases the range of possible characters to 256 and gives Extended ASCII. Data Representation ASCII enables the transfer data from one computer or software package to another e.g. email. It is the simplest form of text with no formatting. A character set is the complete set of characters that are on the keyboard e.g. 1 2 3, a b c, ! ” £, and control characters. A control characteris non-printable e.g. RETURN, TAB, ESCAPE, SPACE etc. They are the first 32 characters in ASCII. Higher Computing

  9. Unicode and its advantages over ASCII Unicode is a 16-bit code (2 bytes) that supports 65,536 characters • Advantages • A code for every character based alphabet in the world • Has codes for Chinese, Arabic etc. • Covers all punctuation marks and control characters Data Representation Snapshot of German keyboard Higher Computing

  10. Bitmapped graphics using greyscale/colour Bitmap graphics are made up of pixels (dots) and each dot is stored as bits or bytes in memory. Data Representation Higher Computing

  11. Bit-depth and no. of colours up to 24-bits (true colour) Bitmap graphics are made up of pixels (dots) and each dot is stored as bits or bytes in memory. Bit-depth is the number of bits used to represent shades of colours of a pixel. Data Representation The more bits per pixel the more colours can be used - but file size will increase. Higher Computing

  12. Pixellated bitmap Bitmapped graphics • Advantages • Individual pixels can be edited • Complexity of image does not affect file size • Can be compressed to JPEG, GIF or TIFF to reduce file size • Disadvantages • Large file size e.g. 3 bytes per pixel • Individual objects cannot be edited • Resolution dependent: low resolution = low quality • Image ‘pixellated’ when resized bigger Data Representation Higher Computing

  13. Vectored graphics Vectors are stored as a description of the objects that make up the graphic e.g. start x, start y, line thickness, fill colour etc. • Advantages • Individual objects can be edited • Objects can be grouped and manipulated as one • Are resolution independent i.e. same quality regardless of resolution • Do not lose quality when resized • Small file size as values not stored for every pixel Data Representation • Disadvantages • Cannot be edited at pixel level • File size can be large if many objects / layers Higher Computing

  14. Need for compression of bitmaps xxx Data Representation Higher Computing

  15. Computer Structure – 6 hours Higher Computing

  16. The processor The processor – also known as the central processing unit (CPU) - is the ‘brain’ of the computer. Its purpose is to interpret instructions and process data contained in computer programs. Computer Structure Intel Pentium Processor Higher Computing

  17. Registers Control Unit ALU RAM Parts of a processor and purpose of CU, ALU and registers The CPU consists of three main parts: The control unit has a timer to that sends signals to fetch, decode and execute program instructions. The arithmetic and logic unit performs arithmetic calculations e.g. / * + - and logic operations e.g. AND, OR etc. Computer Structure The registers are temporary storage areas that hold data, instructions and memory addresses during processing. Higher Computing

  18. Function of the Data Bus and the Address Bus ccc Computer Structure Higher Computing

  19. Read, write and timing functions of the Control Bus ccc Computer Structure Higher Computing

  20. Other control lines ccc Computer Structure Higher Computing

  21. Steps in the fetch-execute cycle ccc Computer Structure Higher Computing

  22. Computer Memory - Registers The registers are temporary storage areas that hold data, instructions and memory addresses during processing. Computer Structure Higher Computing

  23. CPU Cache Main Memory (RAM) Computer Memory - Cache Cache Memory Is a small area of ‘super fast’ access memory, between the processor and main memory, which stores frequently used instructions and data. 2. CPU checks to see whether the next instruction it requires is in cache 1. Cache fetches data from next to current addresses in main memory Computer Structure 4. If not, the CPU has to fetch next instruction from main memory - a much slower process 3. If it is, then the instruction is fetched from the cache – a very fast position Higher Computing

  24. RAM chip Computer memory – Main Memory Main memory is commonly referred to as RAM (random access memory). RAM is used to hold program instructions and data before and after processing by the CPU. RAM is volatile i.e. loses it contents when switched off. Reading from RAM is slower than accessing registers or cache. Use of cache avoids slower fetches from RAM. Computer Structure Adding memory (Mbs or Gbs) improves system performance as more programs and data can be held. Higher Computing

  25. ROM chip Computer Memory - ROM Another type of main memory is Read Only Memory (ROM). ROM is used to store the bootstrap loader program that locates the operating system on the hard disc when the computer ‘boots up’. • Features - ROM • ROM data is permanently etched on chip • Read-only so data cannot be changed • Data not lost when computer switched off Computer Structure Higher Computing

  26. Computer Memory - Backing storage Backing storage is where the computer permanently saves computer programs and data. Computer Structure Is the slowest form of memory as mechanical – access times in milliseconds. Higher Computing

  27. Distinguishing between different parts of memory Registers – fastest access time as internal to CPU Cache – slower than registers but fast as no READ needed Computer Structure RAM – slower than registers and cache Backing store – slowest speed of access Higher Computing

  28. Addressability Main memory consists of a number of storage locations, each of which is identified by a unique address. The ability of the CPU to identify each location is known as its addressability. Computer Structure Each location stores a word i.e. the number of bits that can be processed by the CPU in a single operation. Word length is typically 16, 24, 32 or 64 bits and matches the number of lines on the data bus. Higher Computing

  29. Calculating memory capacity of a computer • Memory capacity can be calculated if we know: • the number of lines on the address bus • and the number of bits stored in each memory location • Note: in Higher we assume the number of bits in a memory location to be the same as the number of bits the data bus can carry. Formula Amount of storage locations = 2 width of the address bus Memory capacity = 2 the width of the address bus * width of data bus Computer Structure Example A computer has a 24 bit address bus and a 16 bit data bus. Calculate the maximum amount of memory this computer can use. 224 * 2 bytes = 33,554,432 bytes 33,554,432 / 1024 = 32,768 kilobytes 32768 / 1024 = 32 megabytes Higher Computing

  30. Questions Calculating memory capacity of a computer • Calculate the total memory requirements of the following computer systems: • Processor has a 16-line address bus and each location stores 16 bits. • Processor has a 16-line address bus and each location stores 32 bits. • Processor has a 32-line address bus and a 24-line data bus. • Processor has a 36-bit address bus and a word length of 32 bits. Computer Structure Remember: Location size = data bus size = word length / size Higher Computing

  31. Measuring performance - Clock speed Clock Speed Is the number of clock pulses a CPU generates per second. Measured in gigahertz i.e. 1GHz = 1 billion pulses per second. These pulses synchronise the steps of the fetch-execute cycle e.g. a clock pulse starts a ‘fetch’, or triggers placing data in the MDR. Computer Structure The faster the clock speed – the more operations can be executed per second. Clock speed indicates processing power but some instructions need more clock pulses on one processor than on another. Higher Computing

  32. Task Clock speed Explain why clock speed on its own is not always a reliable indicator of system performance. [2 marks] Computer Structure Higher Computing

  33. Measuring performance - MIPS Millions of Instructions per Second (MIPS) Measures the number of machine code instructions performed per second. MIPS gives a rough indication of processor performance. Computer Structure However it does not take into account the complexity of the machine code instruction set used so is only considered a rough indicator. Higher Computing

  34. Measuring performance - FLOPS Floating Point Operations per Second (FLOPS) Measures how many floating point operations are processor can perform per second. FLOPS are more accurate than MIPS. Computer Structure They measure a number of clearly definable arithmetic tasks carried out per second. Higher Computing

  35. Measuring performance – Application based Tests This involves running various application programs on different computer systems and observing which system runs these programs the fastest. Computer Structure Most reliable measure of processor performance because it provides the user with actual evidence of how well different processors perform complex operations at high speed. Higher Computing

  36. Improving system performance Data bus width – Increasing the data bus width increases processor throughput i.e. an 8-bit bus can transfer 1 byte of data; a 16-bit can transfer 2 bytes etc. Cache memory - Using / increasing cache (SRAM) means less ‘fetches’ from slower main memory (DRAM). Peripheral speed – Slow transfer rates slow the system down so better to choose peripherals with faster transfer rates. Computer Structure Higher Computing

  37. Current trends in computer hardware Faster clock speeds – improved CPU throughput as millions more instructions per second. More RAM – more sophisticated software can be run, and improved multitasking i.e. more programs loaded simultaneously. More backing storage capacity means more data can be stored permanently. Computer Structure Higher Computing

  38. 00110010 01110101 00001101 Buffers A buffer is an area of memory used to hold data while it is waiting to be transferred between an input device and the CPU or to an output device. Buffers are usually within the peripheral itself. Example Data is stored in a buffer as the keys are pressed on a keyboard. Computer Structure Buffers compensate for speed differences between processor and peripheral and reduce processor interruptions. Higher Computing

  39. Hard disk Slow input devices Slow output devices CPU Spooling Spooling is where data to be transferred is temporarily stored on a backing storage device e.g. hard disc until the peripheral is ready to receive it. Computer Structure Spooling is often used to control printing across a network and have the same advantages as buffers. Higher Computing

  40. Spooling Print spooling across a network. Computer Structure Higher Computing

  41. Hardware for multimedia cc Producing a multi-media catalogue - Scanner, digital camera, photo-quality colour printer, CD Writer, high resolution monitor etc. A computer with a fast processor, 1Gb RAM and 250Gb hard disk. Setting up a LAN in a school - Network Interface Card (NIC), file server, application server, switches, hubs and routers. Developing a school website - Digital camcorder, digital camera, scanner, monitor, printer etc. A computer with a fast processor, 512MbRAM and 80Gb hard disk. Computer Structure Higher Computing

  42. Justification All the hardware selected for these scenarios must be justified against the following criteria: Cost: How much the device costs!! Capacity: How much data the device can store. Measured in Megabytes or Gigabytes. Compatibility: Whether the selected devices will all share data with one another. E.g. USB Resolution: The quality of the image being represented.Measured in DPI. Speed Speed at which data can be input to and output from the various hardware devices. Computer Structure Higher Computing

  43. Solid state storage devices Computer Structure Higher Computing

  44. Development trends in backing storage devices cc Computer Structure Higher Computing

  45. Interfaces The interface is the link between the processor and a peripheral device that enables them to connect • An interface: • Allows the CPU to communicate with an I/O device • Compensates for any differences in operating speeds, codes, voltages etc. between the CPU and the attached device Computer Structure Higher Computing

  46. Functions of an interface • Temporarily stores data being transferred between CPU and device • e.g. characters entered at a keyboard stored in buffers • Converts data received from peripheral into CPU understandable format and vice versa • e.g. changing analogue sound to digital • Displays status information whether device ready to receive or send data • e.g. printer busy, ready to receive, paper jam or out of paper Computer Structure • Sends control signals • e.g. to move read/write heads on a hard disk Higher Computing

  47. Functions of an interface • Printer Example • Operation of interface between CPU and Printer: • CPU checks interface to see if printer is ready • Interface returns a printer ready signal to CPU • CPU sends data to interface until interface sends a buffer full signal • Interface sends data from buffer to printer • Interface returns a buffer empty signal to CPU • Repeat steps 3 to 5 until job complete Computer Structure Higher Computing

  48. Serial transmission Where data has to be transmitted over any distance, a single carrier is used to transmit one bit at a time. Computer Structure Higher Computing

  49. Parallel transmission If two digital devices are very close to each other it is possible to connect them by a multi strand cable that can transmit a number of bits simultaneously. Computer Structure Higher Computing

  50. Current trends in interfaces cc Computer Structure Higher Computing

More Related