summaryrefslogtreecommitdiff
path: root/sys/man/1
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2016-09-19 01:20:28 +0200
committeraiju <devnull@localhost>2016-09-19 01:20:28 +0200
commit0c50e1bc3d63f8a62986bbd140f9aef48a0cb076 (patch)
treed1e2463acbf009e14caa1e1a78b4f4981a77a11c /sys/man/1
parent1447b95555d6afa39f7ab04f04f1415f8937d899 (diff)
pc(1): add pb (thanks, BurnZeZ); add bit numbering
Diffstat (limited to 'sys/man/1')
-rw-r--r--sys/man/1/pc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/man/1/pc b/sys/man/1/pc
index 90534e243..9c86eba9a 100644
--- a/sys/man/1/pc
+++ b/sys/man/1/pc
@@ -65,6 +65,9 @@ Display \fIn\fR in decimal.
.I hex(n)
Display \fIn\fR in hexadecimal.
.TP
+.I pb(n, b)
+Display \fIn\fR in base \fIb\fR (currently must be one of 0, 2, 8, 10, 16; 0 uses the defined output base).
+.TP
.I abs(n)
Absolute value of \fIn\fR.
.TP
@@ -135,6 +138,10 @@ Use Euclidean division (default).
Use truncating division (same as C).
\fIa\fR / \fIb\fR is rounded towards zero.
\fIa\fR % \fIb\fR can be negative.
+.TP
+\fL\'\fR 1
+Enable numbering bits (disable with 0).
+If the base is a power of two, print the number of the corresponding bit above each digit.
.SH SOURCE
.B /sys/src/cmd/pc.y
.SH "SEE ALSO"