ArticleslgStudy

computer science

CHIP-8

CHIP-8 is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand CHIP-8 rather than just read about it. In short: CHIP-8 is an interpreted programming language, developed by Joseph Weisbecker on his 1802 microprocessor. It was initially used on the COSMAC VIP and Telmac 1800, which were 8-bit microcomputers made in the mid-1970s.

CHIP-8 — main illustration
CHIP-8 — illustration

Key takeaways

  • CHIP-8 belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect CHIP-8 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of CHIP-8 from memory before moving on to harder problems.

Reference excerpt

CHIP-8 is an interpreted programming language, developed by Joseph Weisbecker on his 1802 microprocessor. It was initially used on the COSMAC VIP and Telmac 1800, which were 8-bit microcomputers made in the mid-1970s. CHIP-8 was designed to use less memory than other programming languages like BASIC, while still being easier to program than machine code. The language looks like machine code as it uses hexadecimal codes for instructions, but as an interpreter, like BASIC, it does not need to be assembled or linked before running. CHIP-8 interpreters have since been made for many devices, such as home computers, microcomputers, graphing calculators, mobile phones, and video game consoles.

Community CHIP-8 has been used on a wide range of devices over time; the first community to use CHIP-8 started in the 1970s on microcomputers. They shared extensions and programs in newsletters such as ARESCO's VIPER for COSMAC VIP users or DREAMER for DREAM 6800 users. In the VIPER newsletter, the first three issues detailed the machine code for the CHIP-8 interpreter for the VIP. CHIP-8 applications include original games, demos, as well as recreations of popular games from other systems. Some CHIP-8 applications have been released into the public domain using licenses like the Creative Commons Zero license.

CHIP-8 extensions and variations During the 1970s and 1980s, CHIP-8 users shared CHIP-8 programs, but also changes and extensions to the CHIP-8 interpreter, like in the VIPER magazine for COSMAC VIP. These extensions included CHIP-10 and Hi-Res CHIP-8, which introduced a higher resolution than the standard 64 × 32, and CHIP-8C and CHIP-8X, which extended the monochrome display capabilities to support limited color, among other features. These extensions were mostly backwards compatible, as they were based on the original interpreter, although some repurposed rarely used opcodes for new instructions. In 1979, Electronics Australia ran a series of articles on building a kit computer similar to the COSMAC VIP, based on the Motorola 6800 architecture. This computer, the DREAM 6800, came with its own version of CHIP-8. A newsletter similar to VIPER, called DREAMER, was used to share CHIP-8 games for this interpreter. In 1981, Electronics Today International (ETI) ran a series of articles on building a computer, the ETI-660, which was also very similar to the VIP (and used the same microprocessor). ETI ran regular ETI-660 and general CHIP-8 columns until 1985. In 1990, a CHIP-8 interpreter called CHIP-48 was made by Andreas Gustafsson for HP-48 graphing calculators. Erik Bryntse later created another interpreter based on CHIP-48, titled "SUPER-CHIP", often shortened to SCHIP or S-CHIP. SCHIP extended the CHIP-8 language with a larger resolution and several additional opcodes meant to make programming easier. David Winter's interpreter, disassembler, and extended technical documentation popularized CHIP-8/SCHIP on other platforms. It laid out a complete list of undocumented opcodes and features and was distributed across hobbyist forums. Many interpreters used these works as a starting point. However, CHIP-48 subtly changed the semantics of a few of the opcodes, and SCHIP continued to use those new semantics in addition to changing other opcodes. Many online resources about CHIP-8 propagate these new semantics, so many modern CHIP-8 games are not backwards compatible with the original CHIP-8 interpreter for the COSMAC VIP, even if they do not specifically use the new SCHIP extensions. Some extensions take opcodes or behavior from multiple extensions, like XO-CHIP, which takes some from behavior from SCHIP and CHIP-8E.

Virtual machine description

Memory CHIP-8 was most commonly implemented on 4 kibibyte (KiB) systems (e.g. Cosmac VIP and Telmac 1800) with 4096 (0x1000) memory locations of 8 bits (a byte), which is where the term CHIP-8 originated. However, the CHIP-8 interpreter itself occupies the first 512 bytes of the memory space on these machines. For this reason, most programs written for the original system begin at memory location 512 (0x200) and do not access any of the memory below the location 512 (0x200). The uppermost 256 bytes (0xF00-0xFFF) are reserved for display refresh, and the 96 bytes below that (0xEA0-0xEFF) were reserved for the call stack, internal use, and other variables. In modern CHIP-8 implementations, where the interpreter is running natively outside the 4 KiB memory space, there is no need to avoid the lower 512 bytes of memory (0x000-0x1FF), and it is common to store font data there.

Registers CHIP-8 has 16 8-bit data registers named V0 to VF. The VF register doubles as a flag for some instructions; thus, it should be avoided. In an addition operation, VF is the carry flag, while in subtraction, it is the "no borrow" flag. In the draw instruction VF is set upon pixel collision. The 12-bit address register, named I, is used with several opcodes that involve memory operations.

The stack The stack is only used to store return addresses when subroutines are called. The original RCA 1802 version allocated 48 bytes for up to 12 levels of nesting; modern implementations usually have more.

Timers CHIP-8 has two 8-bit timers. They both count down at 60 hertz, until they reach 0.

Delay timer: This timer is intended to be used for timing the events of games. Its value can be set and read. Sound timer: This timer is used for sound effects. When its value is nonzero, a beeping sound is made. Its value can only be set.

Input Input is done with a hex keyboard that has 16 keys ranging 0 to F. The 8, 4, 6, and 2 keys are typically used for directional input. Three opcodes are used to detect input. One skips an instruction if a specific key is pressed, while another does the same if a specific key is not pressed. The third waits for a key press, and then stores it in one of the data registers.

… excerpt ends here. Continue reading the full article.

Illustrations

CHIP-8: Screenshot of Pong implemented in CHIP-8
Screenshot of Pong implemented in CHIP-8
CHIP-8: Telmac 1800 running CHIP-8 game Space Intercept (Joseph Weisbecker, 1978)
Telmac 1800 running CHIP-8 game Space Intercept (Joseph Weisbecker, 1978)

Worked examples

Example 1 — a first encounter with CHIP-8

Start with the simplest possible case. Write down what CHIP-8 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to CHIP-8 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about CHIP-8 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of CHIP-8

In research
CHIP-8 appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses CHIP-8 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
CHIP-8 is common in secondary-school and first-year university syllabi. It links to neighbouring topics Graphing calculator software, Microcomputer software, Programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for CHIP-8 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “CHIP-8” →

How to study CHIP-8 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what CHIP-8 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain CHIP-8 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is CHIP-8 in simple terms?

CHIP-8 is an interpreted programming language, developed by Joseph Weisbecker on his 1802 microprocessor. It was initially used on the COSMAC VIP and Telmac 1800, which were 8-bit microcomputers made in the mid-1970s.

Why does CHIP-8 matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study CHIP-8?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on CHIP-8.

Tags

  • Graphing calculator software
  • Microcomputer software
  • Programming languages
  • Virtual machines
  • Virtualization software

Keep exploring