1 / 22

Intermediate 2 Computing

Intermediate 2 Computing. Computer Systems. How we count in decimal. Remember how we count. Each column can have 10 different values in it. Making Decimal a Base 10 number system. Binary can only have 2 different values. Binary is a Base 2 number system.

thimba
Télécharger la présentation

Intermediate 2 Computing

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. Intermediate 2 Computing Computer Systems

  2. How we count in decimal • Remember how we count. • Each column can have 10 different values in it. Making Decimal a Base 10 number system. • Binary can only have 2 different values. • Binary is a Base 2 number system.

  3. Binary representation of positive numbers (Cont.) • Using a table like this you can work out the values of binary numbers.

  4. Binary ranges

  5. Conversion from binary to decimal • E.g. an 8- bit binary number 10010011 = 27 + 24 + 21+20 = 128 + 16 + 2 + 1 = 147

  6. Conversion from decimal to binary • Given the binary number 150. • Divide by 2 = 75 r 0 • Divide by 2 = 37 r 1 • Divide by 2 = 18 r 1 • Divide by 2 = 9 r 0 • Divide by 2 = 4 r 1 • Divide by 2 = 2 r 0 • Divide by 2 = 1 r 0 • Divide by 2 = 0 r 1 The binary value is = 10010110

  7. Conversion to and from a byte, Kilobyte, Megabyte • There are 1024 bytes in a kilobyte and 1024 kilobytes in a megabyte so to turn bytes into megabytes you divide once by 1024 to turn them into kilobytes and again by 1024 to turn them into megabytes. • 1 048 576 bytes = 1 048 576/1024 = 1024 kilobytes • 1024 kilobytes = 1024/1024 = 1 Megabyte

  8. Conversion between bytes, Kilobytes, Megabytes, Gigabytes • There are 1024 megabytes in a gigabyte so we calculate the number of megabytes and then dive by 1024 to turn them into gigabytes. • 4 294 967 296 bytes = 4 294 967 296/1024 = 4 194 304 kilobytes • 4 194 304 kilobytes = 4 194 304/1024 = 4096 megabytes • 4096 megabytes = 4096/4 = 4 gigabytes

  9. Conversion between Gigabytes andTerabyte. • There are 1024 gigabytes in a terabyte so we calculate the number of gigabytes and then dive by 1024 to turn them into terabytes. • 512 gigabytes = 512/1024 = 0.5 terabytes

  10. =15 . =0.25 Floating point numbers • First of all look at a real number in decimal. • 15.25 = .1525 x 100 = .1525 x 102 • Any number can be written as: Mantissa x baseExponent • The above example can be written as: • 1111.01 = .111101 x 24 = .111101 x 2100 • Decimal numbers are base 10. • Binary numbers are base 2. This is always the case so the computer doesn’t need to store this.

  11. Exponent mantissa Floating point numbers (Cont.) • 1111.01 = .111101 x 24 = .111101 x 2100 • If the decimal point is always in the same position all that needs stored is the mantissa and the exponent. • This leaves us with • 111101 100

  12. Precision and range of floating point numbers • Precision • The more bits set aside for the mantissa, the more precise the number will be. • If there are not enough bits then the system has to round down loosing precision.

  13. Precision and range of floating point numbers • Range • Increasing the number of bits used to represent the exponent increases the range of numbers that can be represented.

  14. ASCII • American Standard Code for Information Interchange is a method of representing all the characters in memory. • Each character is given it’s own ASCII code. • ASCII is a 7-bit code with the 8th bit being used as a parity bit. • The 7 bit provide 128 possible values for the text. • This gives us 96 characters and 32 control codes. • Many systems use extended ASCII code which is an 8-bit code giving a range of 256 characters

  15. 1110111 00000000 1110111 1110111 1110111 1110111 1110111 1110111 = = The bitmap method of graphics representation • Bitmap representation of graphics means that each pixel in a graphic is represented by a series of bits / bytes. Bitmaps are typically used for creating realistic images, e.g. photographs, the output of paint packages. • In the simplest example each pixel is represented by 1 bit.

  16. 01010100 01010101 00000000 00000000 10101000 11111111 10101000 11111111 10101000 11111111 10101000 11111111 10101000 11111111 10101000 11111111 = Bit depth • The more bits assigned to represent each pixel the greater the range of colours or shades of gray that can be represented. • This is known as the colour bit depth. • Here the bit depth is 2 giving 22= 4 colours =

  17. Bit depth (Cont.)

  18. Relationship between bit depth and file size • Let's look at the file sizes of a tiny 1 inch square graphic. • The more bits that are used to represent a pixel the more colours you get but the greater the file size.

  19. Relationship between bit depth and file size. • If the graphic was larger, say 6 inches square then the table looks like this:

  20. Advantages of bit-mapped graphics • They allow the user to edit at pixel level. • Storing a bit-mapped graphic will take the same amount of storage space no matter how complex you make the graphic.

  21. Disadvantages of bit-mapped graphics • They demand lots of storage, particularly when lots of colours are used. • They are resolution dependent.This means the resolution of the graphic, the number of pixels per inch, is set when the bitmap is produced. If you reduce the resolution, the system reduces the size of the pixel grid and eliminates pixels. This reduces the quality of the image. • You cannot isolate an individual object in a graphic and edit it.

  22. Why is compression needed? • You can see from the table that sizes for bit-mapped graphics can be very large. • This means that they demand lots of storage space, and can take quite a time to transmit across a network. • Compressing the files means that less space is required for storage and transmission times are less.

More Related