1 / 13

Chapter 3 Representing Numbers and Text in Binary

Chapter 3 Representing Numbers and Text in Binary. Information Technology in Theory By Pelin Aksoy and Laura DeNardis. Binary Coded Decimal. Binary coded decimal (BCD) is a different approach Encodes each digit in the decimal number individually rather than converting the entire number

laurel
Download Presentation

Chapter 3 Representing Numbers and Text in Binary

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. Chapter 3Representing Numbers and Text in Binary Information Technology in Theory By Pelin Aksoy and Laura DeNardis

  2. Binary Coded Decimal • Binary coded decimal(BCD) is a different approach • Encodes each digit in the decimal number individually rather than converting the entire number • To convert 30 to BCD, the 3 would first be converted into binary, and then 0 would be converted into binary • Then the two binary strings would be concatenated (i.e. brought together) to represent the number 30 Information Technology in Theory

  3. Binary Coded Decimal (continued) Information Technology in Theory

  4. BCD Example Convert the decimal number 7244(10) into binary coded decimal 7 = 0111 2 = 0010 4 = 0100 4 = 0100 7244(10) = 0111001001000100(2) (BCD) Information Technology in Theory

  5. BCD Example (continued) • Convert the sequence 0001100001111001 into decimal • First break the sequence into groups of four starting from right to left: 0001 1000 0111 1001 • Then convert each group into decimal: • 0001(2) = 1(10) • 1000(2) = 8(10) • 0111(2) = 7(10) • 1001(2) = 9(10) • The answer is 1879(10) Information Technology in Theory

  6. Representing Text and Other Characters in Binary • Binary code can represent text and alphanumeric characters • Two standards: • ASCII • Unicode Information Technology in Theory

  7. ASCII • Extended ASCII assigns an 8-bit code for each alphanumeric character • Recall that an 8-bit code can represent 28, or 256, unique items Information Technology in Theory

  8. Segment of ASCII Chart Information Technology in Theory

  9. ASCII Example H = 01001000 e = 01100101 l =01101100 l =01101100 o = 01101111 ! = 100100001 Therefore, “Hello!” = 0100100001100101011011000110110001101111. The hexadecimal shorthand for this binary sequence is 48 65 6C 6C 6F 21 Information Technology in Theory

  10. Unicode • Unicode is an important standard that uses 16 bits • Allows for a representation of 216 (more than 65,000) unique characters • Provides sufficient characters to encode many different major languages (such as English, Arabic, and Chinese) • Unicode charts may be found by visiting http://unicode.org Information Technology in Theory

  11. EBCDIC • Extended Binary Coded Decimal Interchange Code • Standard associated with IBM computers • Assigns 8 bits per character • An extension of binary coded decimal Information Technology in Theory

  12. Summary • Bits can encode any type of information, including the decimal numbers we use in everyday life and alphanumeric text • A real-world example of binary to decimal conversion is the unique Internet address • Encoded in dotted decimal format • Makes a long binary string easier for people to read • You can also convert between binary and positive integers and represent negative integer and positive noninteger numbers in binary Information Technology in Theory

  13. Summary (continued) • Alternative numbering systems are octal, which uses eight numbers, and hexadecimal, which uses 16 numbers • Not used by digital devices, but by people as a shorthand convention • Network identification in local area networks is usually represented in hexadecimal • Binary code also represents alphanumeric characters • ASCII • Unicode • EBCDIC Information Technology in Theory

More Related