# Syntax error when trying to use bitwise operators

**URL:** <https://discourse.julialang.org/t/syntax-error-when-trying-to-use-bitwise-operators/98984>\
**Category:** New to Julia\
**Created:** [May 17, 2023, 6:55am UTC](https://discourse.julialang.org/t/syntax-error-when-trying-to-use-bitwise-operators/98984 "2023-05-17T06:55:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chskcau](https://avatars.discourse-cdn.com/v4/letter/c/6f9a4e/32.png) [@chskcau](https://discourse.julialang.org/u/chskcau)\
**Post date:** [May 17, 2023, 6:55am UTC](https://discourse.julialang.org/t/syntax-error-when-trying-to-use-bitwise-operators/98984/1 "2023-05-17T06:55:42Z")

</div>

I apologize if this is a stupid question, but I’m literally just starting to learn Julia, working my way through the [manual](https://docs.julialang.org/en/v1.8.5/).

When trying out the bitwise operations, say exclusive or, I found that I couldn’t actually type them in Julia (here, `<TAB>` indicates the tab key):

```julia
julia> 123 v\underbar<TAB> 234
ERROR: syntax: extra token "v̲" after end of expression
Stacktrace:
 [1] top-level scope
   @ none:1

julia> 123 \vee<TAB>\underbar<TAB> 234

ERROR: UndefVarError: ∨̲ not defined
Stacktrace:
 [1] top-level scope
   @ REPL[74]:1

julia>

```

Copying and pasting directly from the manual works, but the pasted character shows up as a box in my terminal, and in any case this doesn’t tell me how to input it.

As such, I have a question and a suggestion.

1. The question: how DO I input the symbols for these operations?
2. The suggestion: it would be cool if, when the manual uses symbols that aren’t on a standard keyboard but that can be input using TeX commands instead, it tells users what those TeX commands are.

Thanks!

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [May 17, 2023, 6:58am UTC](https://discourse.julialang.org/t/syntax-error-when-trying-to-use-bitwise-operators/98984/2 "2023-05-17T06:58:26Z")

</div>

If you type `?` in the repl you’ll get a \>help prompt, and you can paste unfamiliar characters into it like this

```julia
help?> ⊻
"⊻" can be typed by \xor<tab>

```

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [May 17, 2023, 7:05am UTC](https://discourse.julialang.org/t/syntax-error-when-trying-to-use-bitwise-operators/98984/3 "2023-05-17T07:05:30Z")

</div>

As for the box in the terminal, if you use VSCode in combination with the [JuliaMono](https://juliamono.netlify.app/) font, you shouldn’t run into any problems

---

<div class="post-metadata">

**Author:** ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Post date:** [May 17, 2023, 9:39am UTC](https://discourse.julialang.org/t/syntax-error-when-trying-to-use-bitwise-operators/98984/4 "2023-05-17T09:39:24Z")

</div>

Can you specify, please, in more detail the advantages of having the juliamono font available?  
Once the new fonts are installed on windows, what must be done to use them in vscode?

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [May 17, 2023, 9:57am UTC](https://discourse.julialang.org/t/syntax-error-when-trying-to-use-bitwise-operators/98984/5 "2023-05-17T09:57:35Z")

</div>

You could also just write `xor(123, 234)`.

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [May 17, 2023, 11:22am UTC](https://discourse.julialang.org/t/syntax-error-when-trying-to-use-bitwise-operators/98984/6 "2023-05-17T11:22:13Z")

</div>

> Can you specify, please, in more detail the advantages of having the juliamono font available?

There are some unicode symbols that do not render well with the standard font, and that are taken care of by JuliaMono. Also it’s monospaced, so you have the guarantee that every letter and symbol has the exact same width. Of course it’s not a big deal but I kind of like the new look of my code.

> Once the new fonts are installed on windows, what must be done to use them in vscode?

See the documentation here: [JuliaMono font - FAQ](https://juliamono.netlify.app/faq/#vs-code)
