Skip to content

Commit 9c6ba1f

Browse files
authored
Sync docs for practice exercise all-your-base (exercism#2371)
1 parent 143e928 commit 9c6ba1f

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

exercises/practice/all-your-base/.docs/instructions.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,32 @@
22

33
Convert a number, represented as a sequence of digits in one base, to any other base.
44

5-
Implement general base conversion. Given a number in base **a**,
6-
represented as a sequence of digits, convert it to base **b**.
5+
Implement general base conversion.
6+
Given a number in base **a**, represented as a sequence of digits, convert it to base **b**.
77

88
## Note
99

1010
- Try to implement the conversion yourself.
1111
Do not use something else to perform the conversion for you.
1212

13-
## About [Positional Notation](https://en.wikipedia.org/wiki/Positional_notation)
13+
## About [Positional Notation][positional-notation]
1414

15-
In positional notation, a number in base **b** can be understood as a linear
16-
combination of powers of **b**.
15+
In positional notation, a number in base **b** can be understood as a linear combination of powers of **b**.
1716

18-
The number 42, *in base 10*, means:
17+
The number 42, _in base 10_, means:
1918

20-
(4 * 10^1) + (2 * 10^0)
19+
`(4 * 10^1) + (2 * 10^0)`
2120

22-
The number 101010, *in base 2*, means:
21+
The number 101010, _in base 2_, means:
2322

24-
(1 * 2^5) + (0 * 2^4) + (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (0 * 2^0)
23+
`(1 * 2^5) + (0 * 2^4) + (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (0 * 2^0)`
2524

26-
The number 1120, *in base 3*, means:
25+
The number 1120, _in base 3_, means:
2726

28-
(1 * 3^3) + (1 * 3^2) + (2 * 3^1) + (0 * 3^0)
27+
`(1 * 3^3) + (1 * 3^2) + (2 * 3^1) + (0 * 3^0)`
2928

3029
I think you got the idea!
3130

32-
*Yes. Those three numbers above are exactly the same. Congratulations!*
31+
_Yes. Those three numbers above are exactly the same. Congratulations!_
32+
33+
[positional-notation]: https://en.wikipedia.org/wiki/Positional_notation

0 commit comments

Comments
 (0)