on master help sign in
Expanding explanation of tree addressing

Following up on discussion at issue #160: https://github.com/urbit/docs/issues/160

commitdd058e8ccff2ceb5bcb4556145ddd157e21e8d04 authorJoshua Reagan <joshuareagan@users.noreply.github.com> dateSat 30 Sep 2017, 02:01 (9 years ago) parentcf79ea7
1 file changed+12−4
docs/byte/2.md+12−4
docs/byte/2.md+12−4
@@ -139,9 +139,9 @@ it? Let's keep working with our little test subject `a`.
139139
140140The most basic way to access the subject is *tree geometry*.
141141Every noun is a binary tree; every noun in the tree has a number
142−which is its address. The root of the tree is `1`; if the
143−address of a cell is `n`, its head is `2n` and its tail is
144−`2n+1`.
142+which is its address. The root of the tree is `1`. If the
143+address of a cell is `n`, the address of its head is `2n` and the
144+address of its tail is `2n+1`.
145145
146146A picture might help:
147147```
@@ -170,7 +170,15 @@ The syntax for a fragment of the subject at a tree address, or
170170[.3.14 ~m45]
171171```
172172
173−Of course, the fragment retains the type it had when we built it.
173+The fragment retains the type it had when we built it.
174+
175+Another (equivalent) way to think of tree addressing involves
176+binary. As before, the root of the tree is at address `1`. For
177+the node of a tree at some address `b`, where `b` is binary,
178+you get the address of the head by concatenating a `0` to
179+the end of `b`; and to get the tail, concatenate a `1` at the
180+end. For example, the head of the node at binary address `111`
181+is at `1110`, and the tail is at `1111`.
174182
175183## Labeled surfaces
176184