Swipe to navigate through the chapters of this book
Chapter 2, on top of the basic knowledge provided in Chap. 1, gets the reader familiar with how “information” is represented by a computer in the form of “data”. The chapter starts by introducing why data is essential and how it relates to the representation of a real-world problem on a computer. Afterwards data is classified into two types based on their representational complexity and internals: “basic data” and “structured data”. After presenting the basic data types in details, the string, list, and tuple containers are introduced as structured data. While doing so, the chapter discusses how the different basic data types are represented internally by the computer and how the structured data is organized in the memory. As case studies, the corresponding data types in Python are introduced. Lastly, the chapter covers the concept of “variables”, i.e., names that can be used to store and access data in memory.
Please log in to get access to this content
To get access to this content you need the following product:
The exact value depends on how the CPU represents negative numbers.
Except in C and its descendants. C does not provide a distinct boolean type and assumes that the integers 1 and 0 play the True/False role.
Structures are self-referential if they are (recursively) defined in terms of themselves. We will come back to self-referential structures in Chap. 4.
Processors have different sets of instructions for floating point and integer arithmetic.
The assignment operator exists in all imperative languages. ‘ =’, ‘ :=’ are the most common notations used for assignment. ‘ <-’, ‘ <<’, ‘ =:’, ‘ :’ are also used, but less frequently.
- Data: The First Ingredient of a Program
- Springer Vienna
- Sequence number
- Chapter number
- Chapter 2