Bits, trits and GF16
You will learn
How a number is stored in bits, and how balanced ternary stores it in trits.
Hardware stores numbers as fixed groups of bits, and t27 makes you write the width: u8 is 8 unsigned bits, i16 is 16 signed bits. t27 also speaks balanced ternary, where a trit is -1, 0 or +1. For fractions it has GF16, a 16-bit float with 1 sign bit, 6 exponent bits and 9 mantissa bits. Type a number into the calculator and watch how it is rounded, field by field, and how big the error is.
Try it
Type 1.618 and read the exponent and mantissa bits; then type 0.1 and look at the error.

Open the lesson's spec in the player: specs/tutorial/01_values_and_types.t27
All lessons
Module 1 · The chip
What an FPGA is, which chip we use, and how its pins meet the board.
Module 2 · Numbers in hardware
Bits, trits and number formats, and what arithmetic costs in logic.
Module 3 · Your t27 program
Write a spec, test it, and see why compiling is not the same as being right.
Module 4 · Inside t27c
How the compiler reads a spec and what it writes, including the native t27b.
Module 5 · From spec to hardware
The Verilog t27c writes, the cells it becomes, and what one LUT does.
Module 6 · Reading synthesis
What yosys reports about your design, and which warnings matter.
Module 7 · Place, route, timing
Where the cells land on the die, and whether the clock is met.
Module 8 · The bitstream
How a routed design becomes the bits the chip loads, with no Vivado.
Module 9 · On the board
Ask the chip who it is, load the bits, and check them.
Module 10 · Lab: our own research
A number format of our own, an honest scoreboard, and a model's tables multiplied on the board.