Skip to main content Accessibility help
×
Hostname: page-component-77c89778f8-sh8wx Total loading time: 0 Render date: 2024-07-25T02:08:47.834Z Has data issue: false hasContentIssue false

11 - Codes

Published online by Cambridge University Press:  10 November 2016

Shmuel Tomi Klein
Affiliation:
Bar-Ilan University, Israel
Get access

Summary

Representing the Data

You have reached the last chapter and it deals with codes, which share some common properties with data structures as auxiliary tools in many algorithms and programs. Studying these codes will also give an opportunity to conclude this work by reviewing some of the data structures introduced in previous chapters.

The purpose of codes is to bridge the communication gap between humans and machines. Our civilization has generated over the years some quite sophisticated natural languages, yet our computers insist on talking only binary, forcing us to translate whatever information we wish to share with a computer, be it a command or a piece of data, into some binary equivalent. This translation is often called an encoding, the translated elements are code words and their set form a code.

In the simplest scenario, the elements to be encoded are just the letters of some alphabet, like ﹛a, b, c, …, y, z﹜, but one may need to encode also infinite sets as the integers ﹛0, 1, 2, …﹜, or letter pairs, or sets of words ﹛the, of, which, …﹜. Ultimately, the set A to be encoded may be of any nature, as long as there is a well defined way to break a given file into a sequence of elements of A. We shall refer to A as an alphabet and call its elements letters or characters, even in the more involved cases, so these terms should not be understood in their restrictive sense.

The choice of a code will be guided by the intended application and expected properties. In many situations, it will be the simplicity of the processing of the code that will be considered as its main advantage, leading to the usage of some standard fixed length code, for which all the code words consist of the same number of bits. One of the popular such codes is the American Standard Code for Information Interchange (ascii), for which each code word is eight bits long, providing for the encoding of 28 = 256 different elements.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2016

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Codes
  • Shmuel Tomi Klein, Bar-Ilan University, Israel
  • Book: Basic Concepts in Data Structures
  • Online publication: 10 November 2016
  • Chapter DOI: https://doi.org/10.1017/CBO9781316676226.012
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Codes
  • Shmuel Tomi Klein, Bar-Ilan University, Israel
  • Book: Basic Concepts in Data Structures
  • Online publication: 10 November 2016
  • Chapter DOI: https://doi.org/10.1017/CBO9781316676226.012
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Codes
  • Shmuel Tomi Klein, Bar-Ilan University, Israel
  • Book: Basic Concepts in Data Structures
  • Online publication: 10 November 2016
  • Chapter DOI: https://doi.org/10.1017/CBO9781316676226.012
Available formats
×