[Question]
  [
## Background
Boolean Algebra concerns representing values with letters and simplifying expressions. The following is a chart for the standard notation used:
[![Notation](https://i.stack.imgur.com/kWE7v.png)](https://i.stack.imgur.com/kWE7v.png)
Above is what actual boolean algebra looks like. For the purposes of this code golf, this is not the syntax that will be used.
## Your Task
Given a string with three characters, return the solution to the expression.
* Input: The string will be a valid expression in boolean algebra. The second character will either be ".", which represents AND, or "+", which represents OR. The first and third characters will be any of 0, 1, or a capital letter. If a capital letter is given, only one letter is ever given. ie. An input will never have two variables, such as A+B.
* Output: Return the evaluation of the expression as a single character.
**Explained Examples**
```
Input => Output
A+1 => 1
```
A + 1 evaluates to 1 because the OR statement is overridden by 1. That is, no matter what value A takes, the presence of 1 means that the statement will always evaluate to 1.
```
Input => Output
B+B => B
```
B + B evaluates to B because the OR statement is dependent on either Bs being true. If both Bs are false, then the output would also be false. So, the statement returns B since whatever value B takes, the output would return that.
```
Input => Output
0.H => 0
```
0 . H evaluates to 0 because the AND statement is overridden by 0. That is, no matter what value H takes, the presence of 0 means that the statement will always evaluate to 0.
```
Input => Output
1.1 => 1
```
1 . 1 evaluates 1 because the AND statement requires both inputs to be 1, and since they are both 1, 1 is returned.
**Examples**
```
Input => Output
A+1 => 1
B+B => B
R+0 => R
1+1 => 1
0+0 => 0
0.0 => 0
Q.Q => Q
0.A => 0
1.C => C
1.1 => 1
```
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so shortest answer wins.
Too easy? Try [Intermediate Boolean Algebra Calculator](https://codegolf.stackexchange.com/questions/254719/intermediate-boolean-algebra-calculator).
  
[Answer]
# JavaScript (ES6), 26 bytes
-4 bytes by using the simplified logic suggested by [@loopywalt](https://codegolf.stackexchange.com/users/107561/loopy-walt).
```
([x,o,y])=>~x&y!=0^o+1?x:y
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@18jukInX6cyVtPWrq5CrVLR1iAuX9vQvsKq8r91tJ6enpKBoaNSrF5afpFrYnKGRoWCrZ0CFvFKuLieNpJwPki4mktBoVjBVqFCQVshH4grrYECyfl5xfk5qXo5@ekaxUBBdaACdSCdplGsqWnNVaupqfkfAA "JavaScript (Node.js) – Try It Online")
---
# JavaScript (ES6), 30 bytes
Expects a string of 3 characters.
```
([x,o,y])=>x<1^y<1^o+1^x<y?y:x
```
[Try it online!](https://tio.run/##bcqxCsIwFIXhvU9x6dKE1GBW01QcfIrSQoiNWkqvNCK5iM8e4yIODj8HPs5kHza49Xq7bxY8jcmbxLpYY009N21s1EA5FGqIDe1pF5PupJTlVh3KXnpcj9ZdWATTwh@nr0vxw/jhZwEQwEAEAZgjncHhEnAe5YxnFjJW@VDl9SxwrosX5zy9AQ "JavaScript (Node.js) – Try It Online")
### 28 bytes
If we can take three separate characters as input:
```
(x,o,y)=>x<1^y<1^o+1^x<y?y:x
```
[Try it online!](https://tio.run/##bc7BCsIwEATQe79i6aUNqYu52qbiwa8QCyG2aildaUSyiN8e14t48DAMPOYwo3u44Jfr7b6a6dSnwaYyVlSxsm1sTMcS0qaLDW95E1N9QMR8bXb5EQda9s5fygi2hT/OX0f9w/ThZwYQwEIEDSThWsDTHGjqcaJzGQQLGRTSg1wCqoCVqrOXUiq9AQ "JavaScript (Node.js) – Try It Online")
### Truth table
The table below shows the intermediate results coerced to \$0\$ or \$1\$, which is implicitly done by the bitwise operators.
Note that `o+1` evaluates to either `0.1` for `.` (coerced to \$0\$) or `1` for `+` (coerced to \$1\$).
```
 x | y | o | x<1 | y<1 | o+1 | x<y | XOR | use | result
---+---+---+-----+-----+-----+-----+-----+-----+--------
 0 | 0 | . |  1  |  1  |  0  |  0  |  0  |  x  |   0
 0 | 0 | + |  1  |  1  |  1  |  0  |  1  |  y  |   0
 0 | 1 | . |  1  |  0  |  0  |  1  |  0  |  x  |   0
 0 | 1 | + |  1  |  0  |  1  |  1  |  1  |  y  |   1
 0 | A | . |  1  |  0  |  0  |  1  |  0  |  x  |   0
 0 | A | + |  1  |  0  |  1  |  1  |  1  |  y  |   A
 1 | 0 | . |  0  |  1  |  0  |  0  |  1  |  y  |   0
 1 | 0 | + |  0  |  1  |  1  |  0  |  0  |  x  |   1
 1 | 1 | . |  0  |  0  |  0  |  0  |  0  |  x  |   1
 1 | 1 | + |  0  |  0  |  1  |  0  |  1  |  y  |   1
 1 | A | . |  0  |  0  |  0  |  1  |  1  |  y  |   A
 1 | A | + |  0  |  0  |  1  |  1  |  0  |  x  |   1
 A | 0 | . |  0  |  1  |  0  |  0  |  1  |  y  |   0
 A | 0 | + |  0  |  1  |  1  |  0  |  0  |  x  |   A
 A | 1 | . |  0  |  0  |  0  |  0  |  0  |  x  |   A
 A | 1 | + |  0  |  0  |  1  |  0  |  1  |  y  |   1
 A | A | . |  0  |  0  |  0  |  0  |  0  |  x  |   A
 A | A | + |  0  |  0  |  1  |  0  |  1  |  y  |   A
            \_________XOR_________/
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 9 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
Ṣ⁼ÞOṂḂṾƲṪ
```
A monadic Link that accepts a list of three characters as specified and yields the resulting character.
**[Try it online!](https://tio.run/##y0rNyan8///hzkWPGvccnuf/cGfTwx1ND3fuO7bp4c5V/x/u3qJzuD3rUcMcBVs7hUcNc49tetS0JvL/f0dtQy4nbSeuIG0DLkMg2wBIG@gZcAXqBQJpRy5DPWcgNgQA "Jelly – Try It Online")**
### How?
Note that `+` and `.` are less than all other possible characters and that their ordinals are odd (\$43\$) and even (\$46\$), respectively. Also, variables always have ordinals greater than either `0` or `1`.
```
Ṣ⁼ÞOṂḂṾƲṪ - Link: list of characters, S = [a, o, b]
Ṣ         - sort (S) -> [o, min(a,b), max(a,b)]
            ... this places a variable, if present, on the right 
       Ʋ  - last four links as a monad - f(S):
   O      -   ordinals
    Ṃ     -   minimum -> 43 (o='+') or 46 (o='.')
     Ḃ    -   mod two ->  1         or  0
      Ṿ   -   uneval  -> '1'        or '0'
  Þ       - sort (the sorted S) by:
 ⁼        -   equals    ('1'        or '0')
            ... i.e. for o='+' (OR) place any '0's at the right
                  or for o='.' (AND) place any '1's at the right
        Ṫ - tail ...get the right-most
```
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 27 bytes
```
0\+|\+0|1\.|\.1
(\d?)..
$1
```
[Try it online!](https://tio.run/##DcYxCoBADETRfs5hoQSG5ASy6wnWOo2ghY2FWObuMcXn/ff67ufIVJdw0TBnOA2Y/VwXEpNlNjF06dhFYfVaKhWDo2wwbpX9 "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation:
```
0\+|\+0|1\.|\.1
```
Rule 1: OR with 0 or AND with 1 returns the other parameter.
```
(\d?)..
$1
```
Rule 2: Return the first parameter if it's a digit. Rule 3: Otherwise, return the second parameter. Examples:
```
0+0 => 0 (by rule 1)    0.0 => 0 (by rule 2)
0+A => A (by rule 1)    0.A => 0 (by rule 2)
0+1 => 1 (by rule 1)    0.1 => 0 (by rule 1)
A+0 => A (by rule 1)    A.0 => 0 (by rule 3)
A+A => A (by rule 3)    A.A => A (by rule 3)
A+1 => 1 (by rule 3)    A.1 => 1 (by rule 1)
1+0 => 1 (by rule 1)    1.0 => 0 (by rule 1)
1+A => 1 (by rule 2)    1.A => A (by rule 1)
1+1 => 1 (by rule 2)    1.1 => 1 (by rule 1)
```
[Answer]
# [Python](https://www.python.org), 36 bytes
```
lambda s:s[-("+."[s>"1"!=s[2]]in s)]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY3VXISc5NSEhWKrYqjdTWUtPWUoovtlAyVFG2Lo41iYzPzFIo1Y6FqQ9PyixQSFYBiSgaGjkpWXAoggSRkAbBIMlgEaBRIQKHINlkvKz8zT0MjUSdJUxMkVFCUmVeiUaSTplGkqQkxfMECCA0A)
#### How?
`s>"1"` due to lexicographic ordering this is the same as `s[0]>"0"` which is the same in both our "dream ordering" and actual string ordering.
`"1"!=s[2]` in standard ordering is `1>s[2]` in dream ordering.
Taken together this comprises the three cases where s[0]>s[2] and one equal case which we don't care about.
It remains to xor that with which operator is given.
# [Python](https://www.python.org), 40 bytes (@Jonathan Allan)
```
lambda s:sorted(s)[~("+."["0"in s]in s)]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY3NXISc5NSEhWKrYrzi0pSUzSKNaPrNJS09ZSilQyUMvMUimNBhGYsVH1oWn6RQqICUEzJwNBRyYpLASSQhCwAFkkGiwCNAQkoFNkm62XlZ-ZpaCTqJGlqgoQKijLzSjSKdNI0ijQ1IYYvWAChAQ)
# [Python](https://www.python.org), 41 bytes
```
lambda s:sorted(s)[s.find("+."["0"in s])]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY3NXMSc5NSEhWKrYrzi0pSUzSKNaOL9dIy81I0lLT1lKKVDJQy8xSKYzVjoRpC0_KLFBIVgIJKBoaOSlZcCiCBJGQBsEgyWARoBEhAocg2WS8rPzNPQyNRJ0lTEyRUUJSZV6JRpJOmUaSpCTF8wQIIDQA)
### How?
Ideally, we would like to have an ordering 0 < variables < 1. Then we could use `min` and `max` or similar. But in fact "0" < "1" < variables.
But, as we are are ranking only 2 values we can instead
* check if "0" is one of them
	+ if yes: use normal string ordering
	+ if no: use it up-side-down
Actual algorithm step-by-step:
sort input (standard string ordering). This puts the operator in front of the operands, so we need to select index 1 or -1. It so happens that these are the values find will return if we search the original string for either operator (-1 means not found, 1 is the original position of the operator). We choose which operator to test for depending on the above: whether "0" is in the input.
[Answer]
# [Python 3.8+](https://docs.python.org/3.8/), ~~46~~ 45 bytes
```
lambda s:(c:='01'['+'in s])*(c in s)or max(s)
```
An unnamed function that accepts the string and returns a character.
**[Try it online!](https://tio.run/##ZdBNCoJAFMDxfad4tHkzKeLQJoQJ1BPY1lxMpiT4hU5QiMt2HaEu50XMyUKpWT1@/IdhXnmVpyJfb8qqj/m@T0V2OAqoLRJaHE2GPmqY5FAHdEVCUBMtKsjEhdS0j4dRRrXUIbqUUSijoyrIAoZD0NYY6oAMqf4RR3OUOJPsNFPJbhL2d8scG3Mmxq94hqfEmzf2T8MMV4k7l@ktar1RhPIsUuAQE/Uz@saySnJJ4mWjqAW@hWbsWoAGu@e9e9zQH4nz7y6Cdkn7Fw "Python 3.8 (pre-release) – Try It Online")**
### How?
When the operator is `'+'` (OR) we should return `'1'` if a `'1'` is present or a variable if present, otherwise we have `'0+0'` and should return `'0'`.
When the operator is `'.'` (AND) we should return `'0'` if a `'0'` is present or a variable if present, otherwise we have `'1.1'` and should return `'1'`.
The code implements this logic by constructing a character, `c`, which is `'0'` if the operator is `'+'` or `'0'` if the operator is `'.'` - this is `(c:='01'['+'in s])` - then repeating that character once if it is present in the input string or zero times (giving `''`) if not - this is `*(c in s)` - we return this if it is non-empty otherwise we return the variable if present or the repeated, non-matching digit character - this is `or max(s)`.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 9 bytes
```
sµ?Cg∷=;t
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyJBIiwiIiwic8K1P0Nn4oi3PTt0IiwiIiwiQSsxXG5CK0JcblIrMFxuMSsxXG4wKzBcblwiMC4wXCJcblEuUVxuMC5BXG4xLkNcblwiMS4xXCIiXQ==)
Port of Jonathan Allan's Jelly answer, so upvote that!
```
sµ?Cg∷=;t
s         # Sort
 µ     ;  # Sort by:
  ?Cg     #  Minimum charcode of input
     ∷    #  Modulo two
      =   #  Equals the current item
        t # Last item
```
[Answer]
# x86-64 machine code, 17 bytes
```
66 AD 8A 16 A8 40 74 02 86 C2 9E 10 C4 0F 4A C2 C3
```
[Try it online!](https://tio.run/##bZJdb5swFIav7V9xxpRiFxKRFE1TaDJNu97NriolmeQaA54MVJiusDR/fezYaZtNmkD@eM97HtvHlvNSymkStgYG3wJGF6Vp74WBghZrYtrcPlFStz8hNzHsOqsPlPTK9iBwngxpQsmPX2CxG2RVepcw1CZrYkVVUCJyCaLyIpHIeVCgxBCDygdKOtVTHgDP6GNjddmoHGQlOiiYbnpAlGwbXMpr1xZt9L1upHnMFdzaPtftotpS6ry10A3j9IiLOLPdpQfYwDGJ/XfKKCnaDjzWjjWGkswP3m1g5UdRxCnBdGJ3S5fqgp8gXISwhjAKEXAh6HO@dtkfsfe5PpnoAi1wC6lTzhISV44YJiE8g75aZi9qclGZ3m6X/CV0co0yVv2N0FdnyOdwnkY6u6jf/wP3hIcO91qwYGb3/UzumyAGG2Npb2LLubOhC/9X2775KmSlG4VFz9U6cBZ32MEdNoYRp3kLx1c7zJLVHSLHDWP/XN41L/huiKIDz07wVGmjgI2uUsnw5cZB3whspuF@xMfE/eYGDJ6m6bcsjCjtNK8/pNjgw9ygX5k/)
Following the standard calling convention for Unix-like systems (from the System V AMD64 ABI), this takes the length of the string (which is always 3 and is ignored) in RDI and its address (as an array of single-byte ASCII characters) in RSI, and returns a value in AL.
In assembly:
```
f:  lodsw           # Load two bytes from the string into AL and AH, advancing the pointer.
    mov dl, [rsi]   # Load the next byte from the string into DL.
    test al, 0x40   # Check bit 6 of AL, which is 1 for letters and 0 for digits.
    jz s0           # Jump if the bit is zero.
    xchg dl, al     # (Otherwise: letters) Exchange DL and AL.
s0:             # At this point, AL must be a digit (as they can't be both letters).
    sahf            # Set flags based on AH (which holds the operation character).
                    # In particular, its low bit goes into CF.
    adc ah, al      # Add AL+CF to AH.
            # AH can be '+', 00101011 in binary, becoming 00101100 after adding CF=1,
            #        or '.', 00101110 in binary, staying  00101110 after adding CF=0.
            # AL can be '0' (00110000) or '1' (00110001).
            # Adding that in produces 010111xy, where x is 0 for '+' and 1 for '.',
            #                                     and y is 0 for '0' and 1 for '1'.
    cmovpe eax, edx # If the sum of the bits in the result is even,
                    #  which is true for (+,0) and (.,1), set EAX to EDX's value,
                    #  so that the other operand becomes the return value.
                    # Otherwise -- for (+,1) and (.,0) -- AL is kept unchanged.
    ret             # Return.
```
[Answer]
# Javascript, ~~130~~ 90 chars
```
s=>([x,y]=s[1]=="+"?'01':'10',t=[s[0],s[2]].sort(),s[0]==x&s[2]==x?x:t.includes(y)?y:t[1])
```
130 -> 90 Thanks to @Steffan
[Answer]
# [Java (JDK)](http://jdk.java.net/), 43 bytes
```
(x,o,y)->x==(o+=~o&4|2)|y==o?o:x==(o^1)?y:x
```
[Try it online!](https://tio.run/##ZY89b4MwEIZ3fsUpUiq7IRaOOoFo5KVbp4xVK7kEp04JRviIQAn96/SAdmg6nO557@vVHfVZr4/7z8GeKlcjHEmLBm0h7pPgX800ZYbWlWMzK7T38KxtCZcAwJaY10ZnOTzBBbIPXYOuqqJjE7bhXHI/ueMJ9LRVNe@FzcCjRkpnZ/dwootsh7UtDy@voOuD55MB0GED6cDa0IUdXz@2acrcKv1ydw/XDb92aeq2Lp6qb5Jvu7gdkmnPuBrYmVwx9wjxn5sAu85jfhKuQVGRKRq2WPoYltmyXITTSghGzL@MSowPKGQRn7u/Wt7oDed89h8f7YN@GKJVRKEo5KCIFbEilsSSWBJHgmYEzQiaIVbEilgSS2Ip5Dc "Java (JDK) – Try It Online")
Taken as three characters, returning one character.
[Answer]
# Python3, ~~116~~ ~~103~~ 74 chars
```
lambda s:[[max(s),y:='01'[b:=s[1]<'.']][y in s],x:='10'[b]][s[0]==s[2]==x]
```
116 => 103 Thanks to @Unrelated String
103 => 74 Thanks to @Steffan, with a radically different answer
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 12 bytes
```
ＦＩ№θ+¿№θιι⌈θ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z8tv0hBwzmxuETDOb80r0SjUEdBSVtJU1NTITNNASGWCRQIKMoEcjI1rRVSc4pToVzfxIrM3NJcjUJNTev//x21Df7rluUAAA "Charcoal – Try It Online") Link is to verbose version of code. Explanation: Port of @JonathanAllan's Python answer.
```
ＦＩ№θ+
```
Count the number of `+`s in the input string, then cast that to string and loop over the character (golfy way of reusing the result as a variable).
```
¿№θι
```
If the input contains that digit, then...
```
ι
```
... output the digit, otherwise...
```
⌈θ
```
... output the letter if there is one, otherwise the other digit.
[Answer]
# [MathGolf](https://github.com/maxbergmark/mathgolf/blob/master/math_golf.txt), 9 [bytes](https://github.com/maxbergmark/mathgolf/blob/master/code_page.py)
```
s‼╞├$¥░=§
```
[Try it online.](https://tio.run/##y00syUjPz0n7/7/4UcOeR1PnPZoyR@XQ0kfTJtoeWv7/v5KjtqESl5KTthOQDNI2AJKGYBEDMNtAD0QG6gWC2Y4gWT1nMGmoBAA)
**Explanation:**
```
         #  (e.g. input1="R+0";      input2="A.0")
s        # Sort the (implicit) input-string
         #  STACK1: "+0R";           STACK2: ".0A"
 ‼       # Apply the following two commands separately on the same stack:
  ╞      #  Discard the left character
  ├      #  Extract the left character
         #   STACK1: "0R","0R","+";  STACK2: "0A","0A","."
   $     # Convert the top character to its codepoint integer
         #  STACK1: "0R","0R",43;    STACK2: "0A","0A",46
    ¥    # Modulo-2
         #  STACK1: "0R","0R",1;     STACK2: "0A","0A",0
     ░   # Convert it to a string
         #  STACK1: "0R","0R","1";   STACK2: "0A","0A","0"
      =  # Get the index of this character in the string (-1 if not found)
         #  STACK1: "0R",-1;         STACK2: "0A",0
       § # Modular 0-based index it into the string
         #  STACK1: "R";             STACK2: "0"
         # (after which the entire stack joined together is output implicitly as result)
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 32 bytes
```
->s{s[s=~/0\+|\+1|1\.|\.0/?2:0]}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1664uji62LZO3yBGuyZG27DGMEavJkbPQN/eyMogtvZ/gUK0kqO2oZKOkqF2FJB00nYCkkHaBkDSQDsELG4IZkNEwGw9EDtQLxDMdgSp0XMGkxBZQ6VYvdzEAg21NM3/AA "Ruby – Try It Online")
If the expression contains one of `0+`, `+1`, `1.` or `.0`, then the result is the RHS, otherwise it's the LHS.
### Why?
First, let's discard the case where the first and third character is the same, in that case both are good. We are left with 8 cases to handle:
```
RHS cases:
0+X => X
X+1 => 1
X.0 => 0
1.X => X
LHS casaes:
X+0 => X
1+X => 1
0.X => 0
X.1 => X
```
[Answer]
# [Haskell](https://www.haskell.org/), 99 bytes
```
c i=fromEnum i+91*fromEnum(i=='1')
f x=toEnum$(if x!!1>'+'then min else max)(c$x!!0)(c$x!!2)`mod`91
```
[Try it online!](https://tio.run/##ZdBPS8MwGAbwez/Fs1FoamppvA2MsA5vXjqPIix0KQ0mjTQZ7uB3r4lurmy5vLy/PPnbC/chtZ6mFop3ozXPw8FA0RW7O3dEcZ6xLE86HLm3kVKiQrNYsKeMZr6XA4waILWTMOKYkzYNk9WpPuQ7Y/e7FZu8dL4VTjpwvCUIgyzXlC0LxP2Lk9S0jlJfZEurKNuLsJtV1V@mmkl5LU3ZRGnmmfVVhpWbKJu5nM/6hfckGeP9OyhwDotvEFXYHI/3@H9gCBkRvoTj8@Bf/fgyIIXr7VcoQmuoPcZk@gE "Haskell – Try It Online")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~72~~ 65 bytes
*-7 bytes thanks to [@ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat)*
```
#define f(x)x[2*((*x-x[2]+((*x==49)-(x[2]==49))*91)*(x[1]-44)>0)]
```
[Try it online!](https://tio.run/##TY/dasMwDIWv46cQLQU7f9hbNihbCk2fIL1tzSiO0xg6NzQOC4w@eyYnZRSE@HQ4R0IqOSs1jstK18ZqqOnAhsNLSGk4JAgy8pTn2Zol1M8TsnAtWIizkEmWsQ1nclwaqy59peGzc5W5ps2GEGMdfJ@MpeyXBKo53cDYtneHd/lBgp/GXDTQs3YdnWTGAG2zTw/t17V3qEL@CGU@FMz8Kp/kf3zzyL2rveHpmi5WHayUr6NdxLMrftod47@P05i6E3Ift5EAQYqogILsIw57IiaFI3PCU9/LtIQSeYss0h3ssKPnDw "C (gcc) – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 9 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
{ΣIÇßÉQ}θ
```
Port of [*@JonathanAllan*'s Jelly answer](https://codegolf.stackexchange.com/a/254517/52210), so make sure to upvote him as well!
[Try it online](https://tio.run/##yy9OTMpM/f@/@txiz8Pth@cf7gysPbfj//8gbQMA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfeWhlf@rzy0@tO5w@@H5hzsDa8/t@K/zP1rJUdtQSUfJSdsJSAZpGwBJQ7CIAZhtoAciA/UCwWxHkKyeM5g0VIoFAA).
**Explanation:**
```
{        # Sort the characters of the (implicit) input (based on codepoints)
 Σ       # Then (stable-)sort it further by:
  IÇ     #  Push the input as a list of codepoints
    ß    #  Pop and push the minimum
     É   #  Check if this is odd
      Q  #  Check if it's equal to the current character
         #  (a '0' for '+'; and a '1' for '.')
 }θ      # After the sort-by, leave the last character
         # (which is output implicitly as result)
```
[Answer]
# [Haskell](https://www.haskell.org/), 60 bytes
```
f(a:o:b)|a<'1'||b=="1",o<'.'=b|a=='1'||b<"1",o>'+'=b|1>0=[a]
```
[Try it online!](https://tio.run/##bc/RCoIwFMbxe5/iMIIVy7FzKzuC@gTzNrqYlCSaRnW5d180DZp4@@PP@Tg3@@qvw@B9u7fZlDUHZzVH7lxDxJAdJ80lp8ZZopl10JyLr2Ku6GTP/m67EQguUwKPZze@YQctsEIggzQFjLQUZdAy0lqooHWkKKqNC2ppVRKz/PG/GmmCmlVbbLQo57lqpcsb/gM "Haskell – Try It Online")
Inspired by @G B [answer](https://codegolf.stackexchange.com/a/254549/84844)
[Answer]
# GNU [sed](https://www.gnu.org/software/sed/) -r, 33
```
s/0\+|\+0|1\.|\.1//
s/(\d)?../\1/
```
I golfed this myself, *honest*. Though in reality it turns out to be a simple port of @Neil's [answer](https://codegolf.stackexchange.com/a/254521/11259).
[Try it online!](https://tio.run/##Dca7DYAwDADR3pOArPgzAQpMALXLIEQDiECX2TEuTu/qWtJ2vO6VxbAZSlOjZqTMULmz0g9EbMruGRVGHGFBAY2XUEhgpjnMoDRFCt95Pft5VE/3Dw "sed – Try It Online")
[Answer]
# T-SQL, 59 bytes
input is a table
```
SELECT iif(a+b+c in(a+'+0',a+'.1','1+'+c,'0.'+c),a,c)FROM @
```
**[Try it online](https://dbfiddle.uk/N04FyPFN)**
# T-SQL, 77 bytes
input is char(3) - which is kind of a string in sql
```
PRINT stuff(@,iif(right(@,2)in('+1','.0')or
left(@,2)in('1.','0+'),1,2),2,'')
```
**[Try it online](https://dbfiddle.uk/1uKB8BaG)**
[Answer]
# [Scala](http://www.scala-lang.org/), 108 bytes
Port of [@AZTECCO's Haskell answer](https://codegolf.stackexchange.com/a/254556/110802) in Scala.
Golfed version. [Try it online!](https://tio.run/##dY89D4IwEIb3/ooLg7RpUltHYknA2QGNk3GoCgaDaKAxEfW3Yyv4EQhd7vI8fS935U5lqj5vj/FOw1ylOdwRuqoMEg8vdZHmB@k3lci6kn6a4ApzMnWF@3hUeEKkNC15Y2Ewe2Pe4NHIQt@l7V@bIrZh@twMhTgrY0c4toDNfU0N@ziBk9kIq@JQehAUhbqtG7khHqzyVIM064J5F0N1luMEOwEVDiEwHoPoqpCGrQq7akF5qxZdJehsaCD/pjjqOfZzHRWxqFVRPxUMpQT77DHrq/@bn@iJ6hc)
```
z=>if(z(0)<'1'||z(2)=='1')if(z(1)<'.'||z(0)=='1'&&z(1)>'+'||z(2)<'1')z(2).toString else"1"else z(0).toString
```
Golfed version. [Try it online!](https://tio.run/##dZA9b4MwGIR3fsWJBVtIDu4YJZUgcwdSdUnVwaQQUVGowKpUJfx26i9ahJXtvffxne0bzqIRU1d8lGeJJ1G3uE7vZYWKnLZ4ln3dXug8YI9rAHyLBkLNJ5JQJzsj@SwLIx9ooHRdgQjsEPEIt5tGez1TE2VxpzFTq4LJzl5lWNkMpfNbkw3YLf1zwiOi2E9wGSEPjRytFMtD/m4MJugKPlUbRPSXYYu078XPq@Vvqo@XtpauDeBLbWXTkoqEacxDSrHZgK9RFmcOZWt0jBOHjmvE48O9wOTPlQQeY/9shXKWO5T7rvSei7P5HQcfLf886vp@AQ)
```
def f(Z: String): String = {
  val a = Z(0)
  val o = Z(1)
  val b = Z(2)
  if (a < '1' || b == '1') {
    if (o < '.') b.toString
    else if (a == '1' || b < '1') {
      if (o > '+') b.toString
      else "1"
    } else a.toString
  } else a.toString
}
```
]