I built a quick plugin to fiddle with the building bits. I didn't have a retracting bridge or pit to test with, but I tried a number of other things. These are the values I found:
000: No building whatsoever. Used for normal floors, walls, empty space, and constructions.
001: Not found in my tests.
010: Most passable buildings and stockpiles. Levers, armor stands, chairs, etc. Also used for empty space drawbridges land on.
011: Gem windows, raised drawbridges, and forbidden doors.
100: Not found in my tests.
101: Used for open drawbridges, closed hatches and... the trade depot?
110: Impassible portions of workshops, statues.
111: Vertical bars, non-forbidden doors.
While it took some time to isolate dwarves (my fortress has too many possible paths), I was eventually able to block some dwarves in by painting invisible statues (110) over normal floor. I tried to get them to path through walls by marking them as doors, trade depots, and passable buildings, but the pathfinding algorithm was not fooled. I didn't have enough open space to perform a real test in my current fortress, but I might set up a test embark to fool around with in a couple days.