{"id":54,"date":"2020-11-04T00:42:46","date_gmt":"2020-11-04T00:42:46","guid":{"rendered":"http:\/\/learnlearn.uk\/igcsecs\/?page_id=54"},"modified":"2022-01-25T05:06:16","modified_gmt":"2022-01-25T05:06:16","slug":"text-representation-binary","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/","title":{"rendered":"Text Representation in Binary"},"content":{"rendered":"<p><div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Starter<\/h2>\n<div class=\"tabcontent\">\n<br \/>\n<strong>Starter<\/strong><\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/games.penjee.com\/binary-bonanza\/game.php\" width=\"850\" height=\"600\" frameborder=\"no\" scrolling=\"no\"><\/iframe><\/p>\n\n<\/div><h2 class=\"tabtitle\">Converting Text to Binary(ASCII)<\/h2>\n<div class=\"tabcontent\">\n\n<h2>Converting text\u00a0to binary<\/h2>\n<p>When computers were first invented most text was represented in binary using the ASCII (American Standard Code for\u00a0 Information Interchange).<\/p>\n<p>Converting text to ASCII formatted binary is a simple process. You simply look up the decimal value for the character in the ASCII table below, and then convert that value from decimal to binary,<a href=\"http:\/\/learnlearn.uk\/binary\/counting-in-binary\/\"> like we did last lesson<\/a>.<\/p>\n<p><strong>Example &#8211; hello<\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-82\" src=\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/ascii-hello-example.png\" alt=\"ascii-hello-example\" width=\"822\" height=\"188\" \/><\/p>\n<p><strong>ASCII Table<\/strong><\/p>\n<p><strong><span style=\"color: #ff0000;\">DO NOT USE THE HEX COLUMN!!!<\/span><\/strong><\/p>\n<div id=\"attachment_83\" style=\"width: 1290px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/ASCII-Table-wide.svg_.png\"><img aria-describedby=\"caption-attachment-83\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-83 size-full\" src=\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/ASCII-Table-wide.svg_.png\" alt=\"Click to enlarge\" width=\"1280\" height=\"851\" \/><\/a><p id=\"caption-attachment-83\" class=\"wp-caption-text\">Click to enlarge<\/p><\/div>\n<p>ASCII Table<\/p>\n\n<\/div><h2 class=\"tabtitle\">Binary &gt; Text<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Converting Binary to Text<\/h3>\n<p>Converting from binary to text is nice and simple. You simply convert each binary number to a decimal number and then look up that number on the ASCII table.<\/p>\n<p><a href=\"http:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/ascii-goodbye-example.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-86\" src=\"https:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/ascii-goodbye-example.png\" alt=\"ascii-goodbye-example\" width=\"826\" height=\"193\" \/><\/a><\/p>\n\n<\/div><h2 class=\"tabtitle\">Practice<\/h2>\n<div class=\"tabcontent\">\n\n<div class=\"arconix-column-one-half\">\n<p><strong>Convert these text examples to binary:<\/strong><\/p>\n<p>a. dog<\/p>\n<p>b. cat<\/p>\n<p>c. mouse<\/p>\n<\/div>\n<div class=\"arconix-column-one-half\">\n<p><strong>Convert these binary examples to text:<\/strong><\/p>\n<p>d.\u00a001100101 01100111 01100111<\/p>\n<p>e.\u00a001101000 01100001 01101101<\/p>\n<p>f.\u00a001100011 01101000 01101001 01110000 01110011<\/p>\n<\/div>\n\n<\/div><h2 class=\"tabtitle\">Limitations of ASCII<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Limitation of ASCII<\/h3>\n<p>As computer system usage spread in the US they were mostly used for calculations and storage of data in English. ASCII worked well for this purpose but as computer adoption became more widespread in Europe the limitations of ASCII became clear. ASCII could not representation the accents found in European languages. This lead to the development of <strong>Extended ASCII<\/strong> that included letters with accents.<\/p>\n<p>This worked well in European countries but as computers began to gain a hold in countries with non-roman alphabets (such as Chinese \/ Japanese \/ Cyrillic) it became clear that 256 Characters was not going to be any where near enough &#8211; we were going to need 100,000+ characters for all characters used in different languages.<\/p>\n<p>Because of these limitations new formats were introduced (such as UFT and <a href=\"https:\/\/unicode-table.com\/en\/a\">Unicode<\/a>). These allowed computers to use millions of different characters, alphabets and special characters (such as emojis, non-roman alphabets and mathematical symbols.<\/p>\n<p><strong>Python Script to display all ASCII \/ Extended ASCII Codes<\/strong><\/p>\n<p>Try out this Python Script to display all the ASCII codes on your computers. Some codes might not display properly \ud83d\ude41<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">import<\/span> <span style=\"color: #0e84b5; font-weight: bold;\">os<\/span>\r\ncurrent <span style=\"color: #333333;\">=<\/span> <span style=\"color: #0000dd; font-weight: bold;\">1<\/span>\r\nos<span style=\"color: #333333;\">.<\/span>system(<span style=\"background-color: #fff0f0;\">'cls'<\/span>) <span style=\"color: #888888;\"># use 'clear' for linux based systems<\/span>\r\n<span style=\"color: #008800; font-weight: bold;\">print<\/span>(<span style=\"background-color: #fff0f0;\">\"#### ASCII CHARACTERS ####<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0;\">\\n<\/span><span style=\"background-color: #fff0f0;\">\"<\/span>)\r\n<span style=\"color: #008800; font-weight: bold;\">while<\/span> current <span style=\"color: #333333;\">&lt;<\/span> <span style=\"color: #0000dd; font-weight: bold;\">255<\/span>:\r\n\t<span style=\"color: #008800; font-weight: bold;\">print<\/span>(<span style=\"color: #007020;\">str<\/span>(current)<span style=\"color: #333333;\">+<\/span><span style=\"background-color: #fff0f0;\">'-'<\/span><span style=\"color: #333333;\">+<\/span><span style=\"color: #007020;\">chr<\/span>(current)<span style=\"color: #333333;\">.<\/span>strip(),end<span style=\"color: #333333;\">=<\/span><span style=\"background-color: #fff0f0;\">\"<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0;\">\\t<\/span><span style=\"background-color: #fff0f0;\">\"<\/span>)\r\n\t<span style=\"color: #008800; font-weight: bold;\">if<\/span> current <span style=\"color: #333333;\">%<\/span><span style=\"color: #0000dd; font-weight: bold;\">8<\/span> <span style=\"color: #333333;\">==<\/span> <span style=\"color: #0000dd; font-weight: bold;\">0<\/span>:\r\n\t\t<span style=\"color: #008800; font-weight: bold;\">print<\/span>()\r\n\t<span style=\"color: #008800; font-weight: bold;\">if<\/span> current <span style=\"color: #333333;\">%<\/span><span style=\"color: #0000dd; font-weight: bold;\">128<\/span> <span style=\"color: #333333;\">==<\/span> <span style=\"color: #0000dd; font-weight: bold;\">0<\/span>:\r\n\t\t<span style=\"color: #008800; font-weight: bold;\">print<\/span>(<span style=\"background-color: #fff0f0;\">\"<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0;\">\\n<\/span><span style=\"background-color: #fff0f0;\">#### EXTENDED ASCII CHARACTERS ####<\/span><span style=\"color: #666666; font-weight: bold; background-color: #fff0f0;\">\\n<\/span><span style=\"background-color: #fff0f0;\">\"<\/span>)\r\n\tcurrent <span style=\"color: #333333;\">+=<\/span><span style=\"color: #0000dd; font-weight: bold;\">1<\/span>\r\n\t\r\n<span style=\"color: #007020;\">input<\/span>()\r\n<\/pre>\n<\/div>\n\n<\/div><h2 class=\"tabtitle\">Resources<\/h2>\n<div class=\"tabcontent\">\n\n<p><a href=\"https:\/\/docs.google.com\/presentation\/d\/1mN-9w37lY52QMfOTLkSsZVEwdF57grnR3G7yFVp6NP8\/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">Lesson Slides Show<\/a><\/p>\n<p><a href=\"https:\/\/docs.google.com\/presentation\/d\/1CDIA469H4-5y1d8Oj_mNdaGT-rp4jHh3aU_QM4hewDA\/edit?usp=sharing\">Lesson board starter<\/a><\/p>\n<p><a href=\"https:\/\/play.kahoot.it\/#\/k\/29f4f955-4899-43f8-b697-d3152e31d6b9\">Lesson review Kahoot<\/a><\/p>\n<p><strong>Past Paper Exam Questions<\/strong><\/p>\n<p><a href=\"https:\/\/pastpapers.papacambridge.com\/viewer\/caie\/cambridge-upper-secondary-igcse-computer-science-0478-2015-jun-0478-s15-qp-12-pdf\">0478\/12 Paper 1 Theory May\/June 2015 &#8211; Qn 10<\/a><\/p>\n<\/div><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starter Converting text\u00a0to binary When computers were first invented most text was represented in binary using the ASCII (American Standard Code for\u00a0 Information Interchange). Converting text to ASCII formatted binary is a simple process. You simply look up the decimal value for the character in the ASCII table below, and then convert that value from&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Text Representation in Binary<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"full-width","neve_meta_container":"full-width","neve_meta_enable_content_width":"","neve_meta_content_width":70,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Text Representation in Binary | IGCSE Computer Science | Learnlearn.uk<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Text Representation in Binary | IGCSE Computer Science | Learnlearn.uk\" \/>\n<meta property=\"og:description\" content=\"Starter Converting text\u00a0to binary When computers were first invented most text was represented in binary using the ASCII (American Standard Code for\u00a0 Information Interchange). Converting text to ASCII formatted binary is a simple process. You simply look up the decimal value for the character in the ASCII table below, and then convert that value from&hellip;&nbsp;Read More &raquo;Text Representation in Binary\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/\" \/>\n<meta property=\"og:site_name\" content=\"IGCSE Computer Science\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-25T05:06:16+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/ascii-hello-example.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/\",\"url\":\"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/\",\"name\":\"Text Representation in Binary | IGCSE Computer Science | Learnlearn.uk\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#website\"},\"datePublished\":\"2020-11-04T00:42:46+00:00\",\"dateModified\":\"2022-01-25T05:06:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"IGCSE Computer Science Course\",\"item\":\"https:\/\/learnlearn.uk\/igcsecs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Text Representation in Binary\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#website\",\"url\":\"https:\/\/learnlearn.uk\/igcsecs\/\",\"name\":\"IGCSE Computer Science\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/igcsecs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#organization\",\"name\":\"IGCSE Computer Science\",\"url\":\"https:\/\/learnlearn.uk\/igcsecs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/igcsecs\/wp-content\/uploads\/sites\/23\/2020\/08\/LearnLearnLogowhitenew.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/igcsecs\/wp-content\/uploads\/sites\/23\/2020\/08\/LearnLearnLogowhitenew.png\",\"width\":710,\"height\":98,\"caption\":\"IGCSE Computer Science\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/igcsecs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Text Representation in Binary | IGCSE Computer Science | Learnlearn.uk","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/","og_locale":"en_GB","og_type":"article","og_title":"Text Representation in Binary | IGCSE Computer Science | Learnlearn.uk","og_description":"Starter Converting text\u00a0to binary When computers were first invented most text was represented in binary using the ASCII (American Standard Code for\u00a0 Information Interchange). Converting text to ASCII formatted binary is a simple process. You simply look up the decimal value for the character in the ASCII table below, and then convert that value from&hellip;&nbsp;Read More &raquo;Text Representation in Binary","og_url":"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/","og_site_name":"IGCSE Computer Science","article_modified_time":"2022-01-25T05:06:16+00:00","og_image":[{"url":"http:\/\/learnlearn.uk\/binary\/wp-content\/uploads\/sites\/11\/2017\/01\/ascii-hello-example.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/","url":"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/","name":"Text Representation in Binary | IGCSE Computer Science | Learnlearn.uk","isPartOf":{"@id":"https:\/\/learnlearn.uk\/igcsecs\/#website"},"datePublished":"2020-11-04T00:42:46+00:00","dateModified":"2022-01-25T05:06:16+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/igcsecs\/text-representation-binary\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"IGCSE Computer Science Course","item":"https:\/\/learnlearn.uk\/igcsecs\/"},{"@type":"ListItem","position":2,"name":"Text Representation in Binary"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/igcsecs\/#website","url":"https:\/\/learnlearn.uk\/igcsecs\/","name":"IGCSE Computer Science","description":"","publisher":{"@id":"https:\/\/learnlearn.uk\/igcsecs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/igcsecs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/igcsecs\/#organization","name":"IGCSE Computer Science","url":"https:\/\/learnlearn.uk\/igcsecs\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/igcsecs\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/igcsecs\/wp-content\/uploads\/sites\/23\/2020\/08\/LearnLearnLogowhitenew.png","contentUrl":"https:\/\/learnlearn.uk\/igcsecs\/wp-content\/uploads\/sites\/23\/2020\/08\/LearnLearnLogowhitenew.png","width":710,"height":98,"caption":"IGCSE Computer Science"},"image":{"@id":"https:\/\/learnlearn.uk\/igcsecs\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/igcsecs\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Starter Converting text\u00a0to binary When computers were first invented most text was represented in binary using the ASCII (American Standard Code for\u00a0 Information Interchange). Converting text to ASCII formatted binary is a simple process. You simply look up the decimal value for the character in the ASCII table below, and then convert that value from&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/pages\/54"}],"collection":[{"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":6,"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/pages\/54\/revisions"}],"predecessor-version":[{"id":650,"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/pages\/54\/revisions\/650"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/igcsecs\/wp-json\/wp\/v2\/media?parent=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}