[Question]
  [
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
 
 
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/9266/edit).
Closed 3 years ago.
[Improve this question](/posts/9266/edit) 
# Task
The task is to display any of the 128 possible states of a
[7-segment display](http://en.wikipedia.org/wiki/Seven-segment_display).
Your program should accept a string of 7 characters ("bits") that are either `0` or `1`.
First bit of input corresponds to segment A of the following illustration, the
second to B, etc (ignore `dp`):
![7seg](https://upload.wikimedia.org/wikipedia/commons/0/02/7_segment_display_labeled.svg)
How you represent the display is up to you -- a single Unicode or ASCII symbol,
[ASCII art](https://codegolf.stackexchange.com/questions/997/render-digital-clock-style-numbers), grafically, or whatever you can come up with. However, each
input must have it's own distinct output. If you come up with something fancy I'm sure you can harvest upvotes by showing off some examples.
All 128 possible states of the display are:
![states](https://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/7-segment.svg/220px-7-segment.svg.png)
# Rules
* Codegolf
* As I said, any kind of output is allowed, but it would be nice if you specified it.
* Input can be stdin or command line argument.
# Examples
### Input
```
1101101
```
### Output
As ASCII/Unicode:
```
2
```
Different kinds of ASCII art (I'm not too good at this)
```
 _   ╺┓  ╒╗   ---
 _|  ┏┛  ╔╝     |
|_   ┗╸  ╚╛   ---
              |
              ---
```
  
[Answer]
## C, 106
**Size is 74 chars if allowed to rename program "W00WG5WW1GW66WG4WW2GW33WG"**
```
main(int i,char**s){
    for(s[0]="W00WG5WW1GW66WG4WW2GW33WG";i=*s[0]++;putchar(s[1][i&7]-49?i==71?10:32:42));
}
```
running:
```
./a.out 1101101
 ** 
   *
 ** 
*   
 ** 
```
notes:
'W' and 'G' (0x47 and 0x57) are chosen such that the value & 7 = 7, i.e they safely index the null character that terminates the input string.
[Answer]
## Brainfuck - 224
```
++++++++++[>+>+++<<-]
>>++>,>,>,>,>,>,>,
<<<<<<<.
>[<+.->-]<<.
>>
>>>>>[<<<<<+<+>>>>>>-]<<<<<<.>[<->-]<.>>[<<+.->>-]<<<.>.
>>>>>>>[<<<<<<<+.->>>>>>>-]<<<<<<<<.
>>>>>>[<<<<+<+>>>>>-]<<<<<.>[<->-]<.
>>>[<<<+.->>>-]<<<<.>.
>>>>[<<<<+.>]
```
Prints using Exlamation points:
```
 ! 
! !
 !
! !
 !
```
Not the most readable, but not too horrible either.
Surprised at how close this is to not being last place.
[Answer]
# Postscript 121 107
```
1 12 moveto{}5 0{0 -5 rmoveto}0 5 0 5 -5 0 0 -5 0 -5 5 0
n{49 eq{rlineto}{rmoveto}ifelse exec}forall stroke
```
requires `n` to be defined as the string to process so invoke like
```
gs -g7x14 -sn=1101101 lcd.ps
```
to get
![image of number two](https://i.stack.imgur.com/ZtfTV.png)
the complete set is
![complete set of characters](https://i.stack.imgur.com/lRlOq.png)
[Answer]
## Mathematica: ~~135~~ ~~129~~ 118, image display
```
Image[MorphologicalComponents@Import@"http://goo.gl/j3elE" /. 
      Thread[Range@7 -> IntegerDigits[#, 2, 7][[{7, 2, 6, 1, 3, 5, 4}]]]] &
```
spaces added "for clarity"
![enter image description here](https://i.stack.imgur.com/tlUug.gif)
**Edit**
For those picky fellow site users: Without using an external mask:
```
Image[MorphologicalComponents[ColorNegate@Rasterize@8, CornerNeighbors -> False] /. 
    Thread[Range@7 ->IntegerDigits[#, 2, 7][[{7, 2, 6, 1, 3, 5, 4}]]]] &
```
[Answer]
## APL, ~~58~~ 55
```
' _|'[1+3 3⍴0,x[1],0,(x←1 2 2 1 2 2 1×⍞='1')[6 7 2 5 4 3]]
```
Example input:
```
1101101
```
Output:
```
 _ 
 _|
|_ 
```
---
`⍞='1'` takes the input as a character array and converts it to a numeric array.
`1 2 2 1 2 2 1×⍞='1'` converts that array to: `0` for blank, `1` for `_`, `2` for `|`
`(x←1 2 2 1 2 2 1×⍞='1')[6 7 2 5 4 3]` assign that array to variable `x` and reorder to represent segments F, G, B, E, D, C
`0,x[1],0,(x←1 2 2 1 2 2 1×⍞='1')[6 7 2 5 4 3]` concatenates a blank, segment A and another blank to the front
`3 3⍴0,x[1],0,(x←1 2 2 1 2 2 1×⍞='1')[6 7 2 5 4 3]` reshape to a 3x3 matrix
`1+3 3⍴0,x[1],0,(x←1 2 2 1 2 2 1×⍞='1')[6 7 2 5 4 3]` converts to 1-based indexing
Finally uses the string `' _|'` to convert indicies into characters
---
## Edit
```
' _|'[1+3 3⍴(0,1 2 2 1 2 2 1×⍞='1')[1 2 1 7 8 3 6 5 4]]
```
Shaved off 3 chars by concatenating a `0` to front the array and using duplicate indicies, preventing a variable assignment
[Answer]
## PHP 66 bytes
```
<?for(;11>$i;)echo++$i&3?$argv[1][md5(¡æyÚ.$i)%8]?$i&1?~ƒ:_:~ß:~õ;
```
A slight improvement using an `md5` magic formula, but requires 3 additional binary bytes:  
`¡`, `æ`, and `Ú` are characters 161, 230, and 218 respectively. It should work as is if copied directly, and saved as an ANSI format.
---
## PHP 73 (70) bytes
```
<?for($s=327638584;3<$s;)echo++$i&3?$argv[1][7&$s/=8]?$i&1?'|':_:' ':'
';
```
If you'll allow me three binary characters, this can be reduced to **70 bytes**:
```
<?for($s=327638584;3<$s;)echo++$i&3?$argv[1][7&$s/=8]?$i&1?~ƒ:_:~ß:~õ;
```
where `ƒ`, `ß`, and `õ` are characters 131, 223, and 245 respectively.
Receives input as a command line argument. Sample usage:
```
$ php seven-seg.php 1101101
 _
 _|
|_
$ php seven-seg.php 0111011
|_|
 _|
```
[Answer]
## JavaScript + jQuery + HTML + CSS (~~210~~ 201)
This solution uses CSS sprites and [the image provided as an example](http://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/7-segment.svg/220px-7-segment.svg.png):
### HTML (3)
```
<a>
```
### CSS (~~82~~ 71)
Thanks to [xem](https://codegolf.stackexchange.com/users/10732/xem) for the "*background:url*" trick:
```
a{background:url(//bit.ly/VesRKL);width:13px;height:23px;display:block}
```
### JavaScript (125 after removing newlines added here for readability)
```
i=prompt();
x=-parseInt(i.substr(0,3),2)*23;
y=-parseInt(i.substr(3),2)*13.75;
$('a').css('background-position',y+'px '+x+'px');
```
---
Online test: <http://jsfiddle.net/zhqJq/3/>
[Answer]
# R (65 chars):
```
plot((3^(1i*1.5:-4.5)*(1:7!=7)),col=strsplit(readline(),'')[[1]])
```
Relies on some loose approximations for some transcendental nuumbers ...
[Answer]
# Python 2 - 65
```
s=raw_input()+'0\n'
for i in`0x623C239E38D2EAA1`:print s[int(i)],
```
Example:
```
echo 1101101|python2 7seg.py
0 1 0 
0 0 1 
0 1 0 
1 0 0 
0 1 0
```
[Answer]
## J (51)
```
1 2 1#"1[5 3$' #'{~,|:>0;(88707#:~7#7){>".&.>1!:1[1
```
output:
```
1101101
 ## 
   #
 ## 
#   
 ## 
```
[Answer]
**PostScript: 53 binary, 87 ASCII 52 binary, 86 ASCII**
Hexdump of the program using binary tokens:
```
$ hexdump -C lcd_binary.ps 
00000000  28 34 34 30 34 30 38 30  34 30 34 30 30 30 30 34  |(440408040400004|
00000010  30 34 30 34 34 34 34 34  38 34 38 30 38 29 7b 7d  |0404444484808){}|
00000020  92 49 6e 7b 92 70 31 92  04 92 96 92 6b 92 63 92  |.In{.p1.....k.c.|
00000030  a7 7d 92 49                                       |.}.I|
00000034
```
[Download this file](http://www.mediafire.com/?vs6te3yueiig2r1) to try it out.
Using ASCII tokens:
```
(4404080404000040404444484808){}forall
n{not 1 and setgray moveto lineto stroke}forall
```
First `forall` loop puts all required coordinates on the stack. The coordinates are stored in a string to minimize required space. The coordinates are in reverse order, i.e. the last 4 chars are for segment A. We draw a line from `(0,8)` to `(4,8)` for this segment (actually, we have to add 48 to all coordinates, because `forall` puts all ASCII codes on the stack).
The second `forall` loops through all the `0`s and `1`s in the input string and turns them into a gray value. `0`s are drawn white (gray value 1) and `1`s are drawn black (gray value 0). Then we use the coordinates that the first `forall` loop left on the stack to draw the lines.
Invoke the program using Ghostscript, just like Geoff Reedy's:
```
gs -sn=1101101 lcd.ps
```
This displays: ![Sample output](https://i.stack.imgur.com/GXBnf.png)
[Answer]
## APL ~~101 86 73~~ 69
```
m←45⍴' '⋄m[¯40+⎕av⍳(⍎∊3/' ',¨⍕⍞)/')*+16;EJOQRSAFK-27=>?']←'⎕'⋄9 5⍴m
```
Input is from the screen via ⍞
```
1101101
```
Which produces a 9x5 character matrix composed of blanks and ⎕ as follows:
```
 ⎕⎕⎕
     ⎕
     ⎕
     ⎕
 ⎕⎕⎕
⎕
⎕
⎕
 ⎕⎕⎕
```
The seven digit number is converted into a partition vector to select the ⎕ co-ordinates.
[Answer]
## Mathematica ~~112~~ ~~103~~ ~~100~~ ~~96~~ 88, using Graphs
```
HighlightGraph[z=GridGraph@{3,2},Pick[EdgeList[z][[{3,4,1,2,6,7,5}]],Characters@#,"1"]]&
```
![enter image description here](https://i.stack.imgur.com/WbMxt.gif)
```
Using it to show a calculator display
l = {7-> 7, 1-> 6, 0-> 63, 8-> 127, 9-> 111,3 -> 79, 5-> 109,  2-> 91, 4-> 102, 6-> 125}; 
GraphicsRow[
  HighlightGraph[z = GridGraph[{3,2}, EdgeStyle-> {White}, GraphHighlightStyle-> {"Thick"}], 
    EdgeList[z][[{3, 4, 1, 2, 6, 7, 5}]][[IntegerDigits[#, 2, 7] Range@7]]] & /@
            (IntegerDigits[8736302] /. l)]
```
![Mathematica graphics](https://i.stack.imgur.com/1RjMw.png)
[Answer]
## Python (107)
Definitely more golfable.
```
a=map(int,raw_input())
for i in(0,6,3):print' .. '*a[i]+('\n'+' .'[a[5-i/6]]+'  '+' .'[a[1+i/6]])*(2*(i!=3))
```
Output:
```
1101101
 .. 
   .
   .
 .. 
.   
.   
 .. 
```
Explanation:
```
a is a list of booleans extracted from the input.
When you multiply a string with a number, it will return the string repeated (number) times.
If that number happens to be zero, it returns an empty string.
i is iterated through 0 (pos A), 6 (pos G), and 3 (pos D).
' .. ' will print either section A, G, or D, depending on the value of i.
([string here])*(2*(i!=3)) will print [string here] twice only if i!=3.
Breaking down [string here]:
 - '\n' will print a newline for each repetition.
 - '  ' is the null space between horizontal sections.
 - ' .'[(bool)] will return either ' ' if (bool) is 0, and '.' if (bool) is 1.
 - 5-i/6 will return 5 if i=0 and 4 if i=6. a[5] is section F and a[4] is section E.
 - 1+i/6 will return 1 if i=0 and 2 if i=6. a[1] is section B and a[2] is section C.
```
[Answer]
# Python 2.7 (93 chars):
```
print (' {0}\n{5} {1}\n {6}\n{4} {2}\n {3}').format(*map(lambda x:int(x)and'*'or' ',raw_input()))
```
### Explanation:
With the stdin input, use a makeshift ternary operator to give `*` for true and a space for false. Take those values and plug them into a format statement that's in the format of the 7 digit display. It'd be at most 83 characters if the display worked like this:
```
 a
b c
 d
e f
 g
```
but the ordering makes it longer. Anyone have a way around this?
### Example:
```
$ ./7seg.py
111000
 *
  *
  *
$ ./7seg.py
1111111
 *
* *
 *
* *
 *
```
[Answer]
I thought we needed a lispy answer...
# Clojure, 159 chars
```
(print(apply str(flatten(interpose\newline(partition 3(map(fn[x](if(= x\1)\o" "))(str" "(apply str(interpose" "(map(vec(read-line))[0 5 1 6 4 2 3])))" ")))))))
```
The above will run in the REPL and provide the correct answer. For example:
```
1111111
 o 
o o
 o 
o o
 o 
```
Throwing numbers at it with small modifications:
```
(doseq [i ["1111110" "0110000" "1101101" "1111001" "0110011" "1011011" "1011111" "1110000" "1111111" "1111011"]]
(println (apply str(flatten(interpose\newline(partition 3(map(fn[x](if(= x\1)\o" "))(str" "(apply str(interpose" "(map(vec i)[0 5 1 6 4 2 3])))" "))))))) 
(println))
```
yields:
```
 o 
o o
o o
 o 
  o
  o
 o 
  o
 o 
o  
 o 
 o 
  o
 o 
  o
 o 
o o
 o 
  o
 o 
o  
 o 
  o
 o 
 o 
o  
 o 
o o
 o 
 o 
  o
  o
 o 
o o
 o 
o o
 o 
 o 
o o
 o 
  o
 o 
nil
```
Not easy to read, but they're there!
[Answer]
## Javascript 123
```
s=prompt(i=o='');for(m=' 0516423';i++<15;i%3==0?o+='\n':1)o+=' ─│'[~i%2&(A=+s[+m[~~(i/2)]])+(A&+'110'[i%3])];console.log(o)
```
I can bring the character count lower (101) if we use only one character for the "on" state, but it is less legible:
```
s=prompt(i=o='');for(m=' 0516423';i++<15;i%3==0?o+='\n':1)o+=' ■'[~i%2&s[+m[~~(i/2)]]];console.log(o)
```
[Answer]
# Postscript 136
Not winner, but a different approach.
```
15 string exch{1 and 255 mul}forall
[7 3 9 13 11 5 1]{count 1 sub index 3 1 roll exch put}forall
3 5 8[.02 0 0 .05 0 0]{}image showpage
```
Expects the input string to be on the stack:
```
$ echo '(1101101)'|cat - 7seg.ps |gs -sDEVICE=png16 -sOutputFile=6c.png -
```
This one's even worse. **294** to make a "binary" bitmap. I took me a while to remember that each row is padded to an even byte. So a 3x5 bitmap is five bytes with the 3 msb bits significant.
```
2#1101101
(12345)exch
2 copy 64 and 0 exch put %A
2 copy 2 and 6 bitshift 2 index 32 and or 1 exch put %F B
2 copy 1 and 6 bitshift 2 exch put %G
2 copy 4 and 5 bitshift 2 index 16 and 1 bitshift or 3 exch put %E C
2 copy 8 and 3 bitshift 4 exch put
pop
3 5 1[.02 0 0 .02 0 0]{}image showpage
```
Output is just as ugly as the other one. :(
Alright here's one that looks good. **190**
Edit: It was upside-down and backwards. Fixed now.
```
(1101101)
{neg 49 add 255 mul
1 string dup 0 4 3 roll put}forall
(\377){@/g/f/e/d/c/b/a}{exch def}forall
@ a a @
b @ @ f
b @ @ f
@ g g @
c @ @ e
c @ @ e
@ d d @
4 7 8[.01 0 0 .01 0 0]{}image showpage
```
[Answer]
# Mathematica 264
Getting the output to look right required many bytes, so no cigar this time.
But here's the verbose (264 chars) code anyway.
```
{a, b, c, d, e, g} = {{-1, 5}, {1, 5}, {1, 3}, {1, 1}, {-1, 1}, {-1, 3}};
f@n_ := Graphics[{Yellow, Thickness[.1], CapForm["Round"],
   Line /@ {{g, c}, {g, a}, {g, e}, {e, d}, {d, c}, {c, b}, {b, a}}[[Flatten@
   Position[IntegerDigits[n, 2, 7], 1]]]}, 
   Background -> Blue, PlotRange -> {{-1, 1}, {1, 5}}, PlotRangePadding -> 1]
```
The complete set of characters:
```
GraphicsGrid[Partition[Table[f[p], {p, 0, 128}], 16]]
```
![characteris](https://i.stack.imgur.com/z7tmS.png)
The digits:
```
{f[63], f[6], f[91], f[79], f[102], f[109], f[125], f[7], f[127], f[111]}
```
![enter image description here](https://i.stack.imgur.com/otNG9.png)
[Answer]
**PHP - 155 characters**
```
<?php
$y=array("   \n"," - \n","   \n","  |\n","|  \n","| |\n"); $x = $argv[1]; echo $y[$x[0]].$y[2*$x[6]+$x[2]+2].$y[$x[7]].$y[2*$x[5]+$x[3]+2].$y[$x[4]];
```
it would be 150 characters if we use php 5.4 type array declaration, but i dont have that installed on my laptop so couldn't test it.
**Sample out puts.**
![enter image description here](https://i.stack.imgur.com/pOJPx.jpg)
**Explanation:**
First i divided the 7 segment display to Five rows and 3 columns. With 1st, 3rd and 5th row havimg '-' in the middle column, and space otherwise.
The 2nd and 4th row has a pipe '|' character in the first and last column. Now the presence of these character should be guided by the input values.
I created a lookup table, which is basically two lookup table. First one for the calculation of values for 1st, 3rd and 5th row. And another one at offset 2 ( 3rd item ) for calculation of rows 2nd and 4th.
[Answer]
# Java - 204 characters
```
class A{public static void main(String[]a){char[]c=new char[7];for(int i=0;i<7;i++)c[i]=a[0].charAt(i)==49?i%3==0?95:'|'):32;System.out.printf(" %c %n%c%c%c%n%c%c%c",c[0],c[5],c[6],c[1],c[4],c[3],c[2]);}}
```
Sample output:
```
 _ 
 _|
|_ 
```
Formatted properly:
```
class A {
    public static void main(String[] a) {
        char[] c = new char[7];
        for (int i = 0; i < 7; i++)
            c[i] = a[0].charAt(i) == 49 ? (i % 3 == 0 ? 95 : '|') : 32;
        System.out.printf(" %c %n%c%c%c%n%c%c%c", c[0], c[5], c[6], c[1], c[4], c[3], c[2]);
    }
}
```
Really wish I could avoid that for loop, but I tried a few other things and they were all longer. There's probably a better way to do this, but this is my first attempt at code golf. (And Java's like the worst language for it, which is why I thought it would be interesting.) Even Brainfuck has me beat, but at least my output looks nicer.
EDIT: can get rid of "public" on class, saves me 7 chars!
And thanks, daniero, for showing me printf! (18 chars saved)
Rewrote the output format, changed character literals to decimal, 12 chars saved.
[Answer]
## VBA - 263
It's ugly but it works, I think. I am having trouble viewing the proper bit order, so I'm inferring from others' answers. Even if that piece is wrong, the code length should remain the same.
```
Sub d(b)
Dim c(1 To 7)
For a=1 To 7
c(a)=Mid(b,a,1)
Next
x=" - "
y="|"
z=" "
w="   "
v=vbCr
MsgBox IIf(c(1)=1,x,w) & v & IIf(c(6)=1,y,z) & z & IIf(c(2)=1,y,z) & v & IIf(c(7)=1,x,w) & v & IIf(c(5)=1,y,z) & z & IIf(c(3)=1,y,z) & v & IIf(c(4)=1,x,w)End Sub
```
[Answer]
**VBScript - 178 characters**
```
m=Split("2 7 11 10 9 5 6")
s=" _ "&vbCr&"|_|"&vbCr&"|_|"
For x=1 To 7
If Mid(WScript.Arguments.Item(0),x,1)=0 Then r=m(x-1):s=Left(s,r-1)&" "&Right(s,Len(s)-r)
Next
MsgBox s
```
[Answer]
# CJam - 29
```
l0N]s7078571876784728737Ab\f=
```
CJam is a new language I am developing, similar to GolfScript - <http://sf.net/p/cjam>. Here is the explanation:
`l` reads a line from the input  
`0` is the number 0  
`N` is a variable preinitialized to the newline string  
`]` gathers the elements on the stack into an array  
`s` converts a value (the array) to string, thus appending a zero and a newline to the given input  
`7078571876784728737` is a number (the same number I used in python, but it was in hex there)  
`A` is a variable preinitialized to 10  
`b` does a base conversion, generating the array [7 0 7 8 ... 3 7]  
`\` swaps the last two values on the stack  
`f=` applies the `=` operator (here, indexed array access) on the input string (plus zero and newline) and each number 7, 0, 7, ...  
The index 7 corresponds to the appended zero, and 8 corresponds to the appended newline.
My python solution does exactly the same thing (except the digit separation is done via string conversion)
[Answer]
# VBA, 188 characters
Note that the one has to *type* 188 characters if only including mandatory whitespace -- the IDE expands it out when you copy it into the VBA editor.
```
Sub f(i)
Dim c() As Byte
m=Split("1 6 10 9 8 4 5")
c=StrConv(" _  |_| |_|",128)
c(3)=10
c(7)=10
For x=1 To 7
If Mid(i,x,1) = 0 Then c(m(x-1))=32
Next
MsgBox StrConv(c,64)
End Sub
```
Sadly, VBScript doesn't have a strongly typed Byte array, or that one could be much shorter using this method.
[Answer]
# Javascript (ECMAScript 2016) - 108 bytes
```
console.log(([a,b,c,d,e,f,g]=[...prompt()].map((x,i)=>+x?'_||'[i%3]:' '),` ${a}
${f}${g}${b}
${e}${d}${c}`))
```
This *probably* can be golfed further, but I can't think of anything.
[Answer]
# JavaScript, 148 bytes
```
e=>(e[0]==1?" #\n":"\n")+(e[5]==1?"#":" ")+(e[1]==1?" #\n":"\n")+(e[6]==1?" #\n":"\n")+(e[4]==1?"#":" ")+(e[2]==1?" #\n":"\n")+(e[3]==1?" #\n":"\n")
```
[Try it online!](https://tio.run/##bcvLCsIwEAXQXyntIgnWYH0hhujOn1AXIZ2UlJLUPLoRvz0GumxnceEe7vRiEl46PYatsS2knifgNwzP3Zvz5l4W1cuU1zIH2WQ9zVplKmZpVnfnVT0uvveru8NCE5uEK5TnDj5RO8BIeUSY8tSBaB96yEK1GWOgQVtUoxjUBdUqGpm7wVBL8pXWeDsAHWyHeywJYT/CUjPfHw "JavaScript – Try It Online") (Footer is Node.js to read `.input.tio`)
Accepts input of ABCDEFG in binary flags and returns:
```
 #
# #
 #
# #
 #
```
[Answer]
# SmileBASIC, 136 bytes
```
DIM A[7,2]COPY A,@L@L?DATA.,1,1,3,4,3,6,1,4,0,1,0,3,1INPUT X$FOR I=0TO 6M=I MOD 3GBOX A[I,1],A[I,0],A[I,1]+!M,A[I,0]+!!M,-VAL(X$[I])NEXT
```
Output is graphical.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 4 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
C₄+ç
```
[Try it online](https://tio.run/##yy9OTMpM/f/f@VFTi/bh5f//GxoagBAA) or [verify all possible inputs](https://tio.run/##yy9OTMpM/W9oZOHml2SedXiDgZWLvZLCo7ZJCkr2/50fNbVoH17@X@c/AA).
See the *verify all possible inputs* link above to see the mapping used for each input.
**Explanation:**
This abuses the rules where it states:
> 
> How you represent the display is up to you -- **a single Unicode or ASCII symbol**, ASCII art, grafically, or whatever you can come up with. However, **each input must have it's own distinct output.**
> 
> 
> 
```
C       # Convert the (implicit) input from binary to integer
 ₄+     # Increase it by 1000
   ç    # Convert it to a unicode character with this value (and output implicitly)
```
---
Alternative more in the spirit of the challenge using the output-format:
```
 -
| |
 -
| |
 -
```
### 38 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage):
```
Σ•L7×•Nè}εi" -| | "14∍2ôNèëðº]J24S5∍£»
```
Can definitely be golfed..
[Try it online](https://tio.run/##yy9OTMpM/f//3OJHDYt8zA9PB1J@h1fUntuaqaSgW6NQo6BkaPKoo9fo8Bag8OHVhzcc2hXrZWQSbAoUPLT40O7//w0NDUAIAA) or [verify all possible inputs](https://tio.run/##yy9OTMpM/W9oZOHml2SedXiDgZWLzv9zix81LPIxPzwdSPkdXlF7bmumkoJujUKNgpKhyaOOXqPDW4DCh1cf3nBoV22tl5FJsClQ9NDiQ7v/6/wHAA).
**Explanation:**
```
Σ       }          # Sort the (implicit) input-digits by:
 •L7×•Nè           #  The digit at the same index in the compressed integer 1367524
                   #   i.e. "1101101" → ["1","0","1","1","1","0","1"]
ε                  # Then map each digit to:
 i                 #  If it's a 1:
  " -| | "         #   Push string " -| | "
          14∍      #   Lengthen it to size 14: " -| |  -| |  -"
             2ô    #   Split it into parts of 2: [" -","| ","| "," -","| ","| "," -"]
               Nè  #   Index into it
 ë                 #  Else (it's a 0):
  ðº               #   Push "  " (two spaces) instead
    ]              # Close both the if-else and map
                   #  i.e. ["1","0","1","1","1","0","1"]
                   #   → [" -","  ","| "," -","| ","  "," -"]
J                  # Join everything together to a single string
                   #  i.e. [" -","  ","| "," -","| ","  "," -"] → " -  |  -|    -"
 24S               # Push [2,4]
    5∍             # Lengthened to size 5: [2,4,2,4,2]
      £            # Split the string into parts of that size
                   #  i.e. " -  |  -|    -" → [" -","  | "," -","|   "," -"]
       »           # Join by newlines (and output implicitly)
                   #  i.e. [" -","  | "," -","|   "," -"] → " -\n  | \n -\n|   \n -"
```
[See this 05AB1E tip of mine (*section How to compress large integers?*)](https://codegolf.stackexchange.com/a/166851/52210) to understand why `•L7×•` is `1367524`.
[Answer]
# PHP 5.6, 65 bytes plain ASCII
```
for(;$p++<9;)echo$argn[_707561432[$p]]?"||_"[$p%3]:" ","\n"[$p%3];
```
or, without a trailing linebreak, but with some bitwise fun:
```
for(;$p++<11;)echo$argn[_70785618432[$p]]?L|Sx[$p&1]:a^kAAA[$p&3];
```
Run as pipe with `-nR` or [try them online](http://sandbox.onlinephpfunctions.com/code/9b2187c98212f4ce1abd0749028b641b13069546).
**breakdown 1**
```
for(;$p++<9;)echo           # loop through positions
    $argn[_707561432[$p]]   # map position to input bit
        ?"||_"[$p%3]            # if set: underscore in 2nd column, pipe symbol else
        :" "                    # else space
    ,"\n"[$p%3]             # add newline every 3 columns
;
```
**breakdown 2**
```
for(;$p++<11;)echo          # loop through positions
    $argn[_70785618432[$p]] # map position to input bit (bit 8 for EOL, never set)
        ?L|Sx[$p&1]             # if set: underscore in the middle, pipe symbol else
        :a^kAAA[$p&3]           # else: newline in 4th column, space else
```
]