Computer architecture: Data representation - lecture 3a - Charles Fox - University of Lincoln
Overview
Charles Fox explains how computers use physical states to represent concepts, then develops positional number systems from tallies and ancient tokens to decimal, binary, hexadecimal, and byte-based notation. He shows how base determines representable values and conversion methods, why electronic computers favor binary, and how hexadecimal makes binary data easier for people to inspect.
Key takeaways
- A computer representation links a physical state to a concept: the same quantity can be encoded symbolically as 5 or 0101 and physically as a pattern of electronic states.
- For a positional system with base B and n digits, the number of possible patterns is B^n and the maximum unsigned value is B^n minus 1; four binary bits therefore represent 0 through 15.
- Binary suits electronic hardware because two voltage states are easier to distinguish reliably than many levels, while hexadecimal helps people read binary by mapping each digit to exactly four bits.
- Grouping changes the cost of counting: Sumerian bullae bundled tokens into units such as 12, reducing repeated work compared with handling every token individually.
- A CPU word is its natural data width, commonly 64 bits in modern processors, while byte-based terminology remains widespread because of earlier 8-bit architectures.
- Repeated division with remainders converts decimal integers to another base, while a weighted sum of powers of the base converts them back to decimal.
Chapters
- Charles Fox frames computation as using one part of the physical world to represent another.
- A machine vision system might detect five separate people, classify each detection, and then form the concept of the number five.
- The concept can be encoded as a numeral such as 5 or 0101, then instantiated in hardware as a pattern of on and off light bulbs.
- The Lebombo bone, dated in the lecture to around 40,000 BC, illustrates tally marks as an early way to record counts.
- Sumerian tokens added a type to a quantity: a token could stand for a sheep, cow, or bushel of wheat.
- Token trading separated quick agreement from later delivery, much like modern financial trades can be recorded before final settlement.
- Counting N individual tokens takes time proportional to N, which Fox relates to the computer science notation O(N).
- Sumerian bullae were clay envelopes used to bundle tokens, such as 12 sheep tokens, into a single package.
- A personal cylinder seal marked the package and served as an authentication mechanism for its contents.
- Grouping tokens into a unit of 12 reduced repeated counting and made large trades faster to handle.
- Grouping tally marks by five makes quantities faster to recognize, and Fox connects this practice to the forms of Roman numerals V and X.
- Roman numerals supported arithmetic, but their operations were more cumbersome and error-prone than place-value notation.
- Split wooden tally sticks recorded agreements: the matching stock and foil could be brought together to verify a transaction.
- The lecture notes that the British government continued using tally sticks until 1836.
- Fox compares early Egyptian systems, which repeated symbols for quantities such as thousands, with systems that use positions.
- The modern numeral system developed from Eastern Arabic notation and uses a place-value structure.
- Zero represents an empty position, allowing the same digit to express different powers of ten, as in 1, 10, 100, and 1,000.
- Base 12 is presented as an alternative with more useful divisors than base 10, and can be counted on one hand using its 12 finger segments.
- A decimal digit is one of ten symbols, and n decimal positions can encode 10^n distinct values.
- Four decimal digits represent 10,000 values, from 0 through 9,999, rather than a maximum of 10,000.
- The string 7,475 can be interpreted by expanding each digit into its contribution from powers of ten, then adding those contributions.
- Fox stresses that written digits are symbols whose numerical meaning depends on the positional system.
- Pascal's calculator and Babbage's engines used decimal gears and carry mechanisms to move between digit positions.
- The 1950s UNIVAC and Harwell Dekatron are examples of electronic machines designed around decimal representation.
- IBM's bi-quinary system combined groups of five with binary components, echoing the counting logic of an abacus.
- Modern electronic computers favor binary because distinguishing two voltage states, on and off, is simpler than reliably separating many voltage levels.
- Binary uses two digits, 0 and 1, so n bits represent 2^n possible values; four bits encode 16 patterns, from 0 through 15.
- A binary numeral is interpreted as a sum of digits multiplied by powers of two, just as decimal uses powers of ten.
- Appending a zero to a binary number multiplies it by two, while shifting right corresponds to division by two.
- Fox notes that bit-shift operations can be useful in performance-sensitive code because they express multiplication or division by powers of two.
- English number names group large decimal values into chunks of three digits, which Fox uses to explain how compound digits can make a base easier to read.
- Sexagesimal, the ancient Sumerian base-60 system, remains visible in seconds, minutes, and hours.
- Hexadecimal extends the digit set from 0 through 9 with A through F, representing values 10 through 15.
- Each hexadecimal digit maps directly to four binary bits because 16 equals 2^4, making binary-to-hex conversion a matter of grouping bits in fours.
- A byte contains 8 bits, and a nibble contains 4 bits, which correspond to one hexadecimal digit.
- One byte can represent 256 patterns, commonly written as two hexadecimal digits.
- A CPU word is its natural data width, often 64 bits in modern processors, and registers hold values at that width.
- Historical terms persist across architectures: Fox contrasts 8-bit-era conventions with hybrid designs such as the Atari ST's 16/32-bit processor.
- In base B, n digits encode B^n values, and the largest value is B^n minus 1; an 8-bit value therefore ranges from 0 to 255.
- To convert a base-B numeral to decimal, multiply each digit by its corresponding power of B and add the results.
- To convert a decimal integer to another base, repeatedly divide by the target base and read the remainders in reverse order.
- Base notation differs across contexts: textbooks commonly use subscripts, while code may use prefixes such as 0x for hexadecimal.
- Fox recommends learning conversion algorithms even when tools can do routine conversions, since calculators may not support unusual bases such as base 17.
Transcript excerpt
0:02 Today we are going to talk about data representation. >> This is the last part of the first chunk [snorts] of the module introducing fundamental concepts. After this we are going to spend some time building up the hierarchy of a modern electronic computer such as a PC. And then in the third part of the module, we'll look at a series of examples of increasingly complicated modern architectures. Um, so data representation is the last conceptual ingredient we need [cough] before we can start to do that. Data representation means how do we use the physical stuff in a computer to somehow mirror the structure or what is called
0:51 represent to represent some other part of the world and that representation is what we then use to perform computation over. So the fundamental purpose of computation is to represent something else. A computer [snorts] arguably is only a computer if it is doing that. If it is somehow linked to something outside of itself, something in the real world that it is computing about. So we'll talk a little bit about what what representation is. We'll talk a bit about uh numbers in particular. Much of representation tends to involve numbers one way or another. Um we'll look at some of the particular number systems found inside modern computers. um that includes bases like decimal and
1:39 hex. It includes things like integers and floats. And then at the end, we'll scale up our representations beyond numbers to other kinds of data, including text and images and sound and video. What is representation? Representation is a complex philosophical topic if you really dig into it, which we're not going to do, but just to give you a flavor for how difficult this actually is. Um, when we compute about things, we are
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Charles Fox.