README.md in binary-1.1.0 vs README.md in binary-1.1.1
- old
+ new
@@ -26,22 +26,44 @@
```
Then to get the binary representation of a number, you just need to call `Binary.binary` and pass the number to it, something like follows:
```ruby
-Binary.binary(2018)
+Binary.binary 2018
```
-Output: `"11111100010"`.
+`Output: "11111100010"`.
Also you can pass an array of integers to the method to get an array of their binary values.
```ruby
Binary.binary([26,6,1991])
```
-Output: `["11010", "110", "11111000111"]`.
+`Output: ["11010", "110", "11111000111"]`.
-## Development
+Other methods you can use:
-...
+```ruby
+# number of bits in a number's binary
+Binary.bits 1000
+```
+`Output: 10`.
+
+```ruby
+# number of ones in a number's binary
+Binary.ones 1000
+```
+`Output: 6`.
+
+```ruby
+# number of zeros in a number's binary
+Binary.zeros 1000
+```
+`Output: 4`.
+
+```ruby
+# get array of binaries of all prime numbers between 2 and the given number
+Binary.prime 25
+```
+`Output: ["10", "11", "101", "111", "1011", "1101", "10001", "10011", "10111"]`.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/almishkawi/binary.