Tuesday, June 11, 2019

Computer Science Essay Example | Topics and Well Written Essays - 3250 words

Computer Science - Essay ExampleThe methods for doing the same ar described as below.Textual information deal a file or a document comprises of a collection of material bodys, characters and special characters for example punctuation marks and symbols. A computer uses the following procedures for the changeover of Text to binaryDecimal subjugates be the numbers whose keister is 10 i.e. it uses ten digits (0 to 9) to represent the values, while binary is the number system whose base is twain, it uses 0s and 1s to represent the numbers.Each binary bit has a position assigned to it. The zeroeth position is assigned to the least significant position on the right some side. The 0 or 1 at the respective position is consequently multiplied by the corresponding power of two to obtain its decimal tantamount(predicate) i.e. A digit at Kth position is multiplied by 2 (k-1). For exampleReal numbers may be put into binary scientific notation a x 2b .The number to the right of decimal p art must be multiplied by negative powers two of the corresponding position .The number to the left hand side must be multiplied by the positive powers of two. Mantissa and exponent are then stored .For exampleEach and every character, symbol or punctuation mark is mapped to a corresponding decimal number .For example letter K is mapped to number 75, the number is then encoded by using ASCII code to a string of Binary numbers. ASCII stands for American Standard Code for Information Interchange. It is an 8-bit code, which contains in all 128 characters (uppercase and minuscule letters, numbers, punctuation, symbols, and some non-printing characters such as the blank space).For example, the code for I am would be73 - 01001001 - code for I32 - 00100000 - code for space97 - 01100001 - code for a109 - 01101101 - code for m46 - 00101110 - code for periodREPRESENTATION OF IMAGE To store an image, like a photograph, in binary form, a computer superimposes a grid on that photograph. Each pe l or grid contains one dot of color. In order to store data for that pixel in memory the information about that pixels color must somehow be converted to a binary number. There are various ways to do this which serve to map a pixel to binary numbers. Different ways or methods associate different number of bits with each pixel. There are two main formats in which images are stored in the computer - bitmap (or raster) and vector. In vector representation, all components of the image are stored using mathematical formulas. In a bitmap image, the image is stored in memory by recording some piece of binary data corresponding to each pixel of the image. The number of bits used to store each pixel affects both the image quality and the amount of memory that will be needed to store the image. There are various scales for coding the colors, one being grayscale in which 1 represents black and 0 represents white. Each pixel in a grayscale image can be stored using 1 byte (8 bits).To represent colored images 16-color, 256 color, and RGB color (or true color) color codes are used. Each of the different code requires different

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.