Draw the XNOR digital timing diagram
05AB1E, 101 bytes + 5 UTF-8 bytes = 116 Total Bytes = 106 Bytes
(LEGACY 05AB1E VERSION, NO LONGER ON TIO)
•=(Ín§Àoà`œ¯_eè8y1ÜŸ,Ú®:¹$:,õKA–x[Âì0ãXÔfz}y×ì¹Ï½uEÜ5äÀTë@ºQÈ™ñó:ò…Eä•6B"102345"" ┌─┐└┘"‡6ävyN" A B X"èì}»
Try it online!
The compression:
•=(Ín§Àoà`œ¯_eè8y1ÜŸ,Ú®:¹$:,õKA–x[Âì0ãXÔfz}y×ì¹Ï½uEÜ5äÀTë@ºQÈ™ñó:ò…Eä•
# Pattern, converted to base-6 in base-6=214.
111023102310222223102310231022231112251425142511111425142514251114221022231022231023102222231110231023151114251114251425111114222514251411102222231110231110231110222311111225111114222514222514222511142222
# Actual base-6 pattern.
1110231023102222231023102310222311
1225142514251111142514251425111422
1022231022231023102222231110231023
1511142511142514251111142225142514
1110222223111023111023111022231111
1225111114222514222514222511142222
#Pattern split into chunks of 34.
┌─┐ ┌─┐ ┌─────┐ ┌─┐ ┌─┐ ┌───┐
──┘ └─┘ └─┘ └─┘ └─┘ └─┘ └──
┌───┐ ┌───┐ ┌─┐ ┌─────┐ ┌─┐ ┌─┐
┘ └─┘ └─┘ └─┘ └───┘ └─┘ └
┌─────┐ ┌─┐ ┌─┐ ┌───┐
──┘ └───┘ └───┘ └───┘ └────
# Pattern after replacing 0,1,2,3,4,5 with appropriate blocks.
The conversion:
6B # Convert back to base-6.
"102345"" ┌─┐└┘"‡ # Replace numbers with appropriate counterparts.
6ä # Split into 6 equal parts (the rows).
vy } # For each row (chunk).
N" A B X"èì # Push label at index [i], prepend to line.
» # Print all separated by newlines.
Using the CP-1252 encoding.
Bubblegum, 76 bytes
00000000: 92d6 3000 5431 1505 1403 50e8 4e0a aafc ..0.T1....P.N...
00000010: 9f62 15e6 a3ff 61fa dc05 e06d 8b66 cbc7 .b....a....m.f..
00000020: e6b6 cff8 519a b85a 3eb6 b67d 95c0 0feb ....Q..Z>..}....
00000030: 35b5 521d 7f7e 68af a916 fa20 d999 564d 5.R..~h.... ..VM
00000040: 1f03 d559 59ed 265c f243 42be ...YY.&\.CB.
Try it online!
Uses box-drawing characters from the VT100 alternate character set, which TIO can’t demonstrate. Run in a UNIX terminal for best results. My terminal converts the ACS to UTF-8 on copy-and-paste, so you can see the effect here.
anders@change-mode:/tmp$ bubblegum xnor.zlib
┌─┐ ┌─┐ ┌─────┐ ┌─┐ ┌─┐ ┌───┐
A ──┘ └─┘ └─┘ └─┘ └─┘ └─┘ └──
┌───┐ ┌───┐ ┌─┐ ┌─────┐ ┌─┐ ┌─┐
B ┘ └─┘ └─┘ └─┘ └───┘ └─┘ └
┌─────┐ ┌─┐ ┌─┐ ┌───┐
X ──┘ └───┘ └───┘ └───┘ └────
▒┼␍␊⎼⎽@␌▒┼±␊-└⎺␍␊:/├└⎻$
Well, the challenge didn’t say we need to take the terminal back out of ACS mode before returning to the shell. Good luck with that.
Ruby, 113 bytes
counting printed symbols as one byte as authorised by the challenge (I was surprised to discover they are actually 3 bytes.)
6.times{|i|s=' A B X'[i]
'D]zunIWkF]nIRukFH'.bytes{|b|s+=' ┌─┐───┘ └'[(b*2>>i/2*2&6)-i%2*6,2]}
s[1]=' '
puts s}
6 lines of output lends itself to an encoding of 6 bits per each character of the magic string. But the magic string characters actually encode for each transition thus:
least significant bit 0 New value for A
1 Current value for A
2 New value for B
3 Current value for B
4 New value for X
5 Current value for X
most significant bit 6 Always 1 (to remain in printable range)
This is decoded to find the 2 characters that must be printed for each transition (the first of which is either space or a horizontal line.)
The 8-character strings for the upper and lower rows overlap: The last two characters for the upper row 11
are two horizontal lines, which matches with what is needed for the first two characters of the lower row 00
. The 8 characters for the lower row wrap around: they are last 6 and first 2 characters of the symbol string.
Ungolfed code
6.times{|i|s=' A B X'[i] #iterate through 6 lines of output. Set s to the 1st character.
'D]zunIWkF]nIRukFH'.bytes{|b| #for each byte in the magic string
s+=' ┌─┐───┘ └'[(b*2>>i/2*2&6)- #add 2 bytes to s, index 0,2,4, or 6 of the symbol string depending on relevant 2 bits of the magic string.
i%2*6,2] #if the second (odd) row of a particular graph, modify index to -6,-4,-2, or 0
} #(ruby indices wrap around. mystring[-1] is the last character of the string.)
s[1]=' ' #replace intitial ─ of the curve with space to be consistent with question
puts s #output line
}