Skip to content

Commit bd49fba

Browse files
committed
update readme
1 parent 1a9aa7e commit bd49fba

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ when isMainModule:
5757
a = 0000000000000000000000000000000000000000000000000000000000000000000000
5858
b = 0000000000000000000000000000000000000000000000000000000000000000000000
5959
set bits ...
60+
set [0,1,2,3,4,69]-th bit of a
6061
a = 1111100000000000000000000000000000000000000000000000000000000000000001
62+
set [6,7,8,9,65]-th bit of a
6163
b = 0000001111000000000000000000000000000000000000000000000000000000010000
6264
a & b = 0000000000000000000000000000000000000000000000000000000000000000000000
6365
a | b = 1111101111000000000000000000000000000000000000000000000000000000010001
@@ -71,11 +73,10 @@ a.shr(1) =0111110000000000000000000000000000000000000000000000000000000000000000
7173
a.shr(2) =0011111000000000000000000000000000000000000000000000000000000000000000
7274
a.shr(3) =0001111100000000000000000000000000000000000000000000000000000000000000
7375
a.shr(69)=0000000000000000000000000000000000000000000000000000000000000000000001
74-
basic types
75-
1001111111111111111111111111111111111111111111111111111111111111
76-
1110000000000000000000000000000000000000000000000000000000000000
77-
1000011101011110001010000111010111100010100001110001111111111101
78-
1000011101011110001010000111010111100010100001110001111111111100
79-
1001111111111111
80-
1110000000000000
76+
expand a to 100 bits: 1111100000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000
77+
127.uint32.toBitsArray = 11111110000000000000000000000000
78+
127.uint32.toBitsArray.reverseBits = 00000000000000000000000001111111
79+
127.uint32.toBitsArray.reverseBits.reverseBits = 11111110000000000000000000000000
80+
(uint32.high-3).toBitsArray = 00111111111111111111111111111111
81+
(uint32.high-3).toBitsArray.reverseBits = 11111111111111111111111111111100
8182
```

0 commit comments

Comments
 (0)