# 进制与位运算

### 十进制、十六进制、二进制与八进制

Soulver 支持基数 2（二进制）、八进制（基数 8）和十六进制（基数 16），并支持各种格式之间的转换。

```
# 转换器
256 作为十六进制 | 0x100
99 的二进制表示 | 0b1100011
0x9F31 到十进制 | 40,753
0b1000101 到八进制 | 0o105

# 短语
0b101101 作为八进制 | 0o55
0x2D 作为二进制 | 0b101101

# Python 风格函数
int(0o55)          | 45
hex(99)            | 0x63
bin(0x73)          | 0b1110011
```

### 位运算符

| 运算符       | 名称                         |
| --------- | -------------------------- |
| & 或 AND   | 按位与 (Bitwise AND)          |
| \| 或 OR   | 按位或 (Bitwise OR)           |
| xor 或 XOR | 按位异或 (Bitwise XOR)         |
| <<        | 按位左移 (Bitwise left shift)  |
| >>        | 按位右移 (Bitwise right shift) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.soulver.app/zh/yu-fa-can-kao/bases-and-bitwise.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
