Post History
Sandbox
Make my value binary [released]
#14: Post edited
Make my value binary [released]
# Challenge What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value. - Take input of a non-negative decimal integer and output its binary value/form. - Any preceding zeros don't need to be outputted. - <s>Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.](https://codegolf.codidact.com/comments/thread/4166#comment-12893)</s> (Won't be in the final draft) - <s>Adding to the disallowed converters, any built-in method that formats the variable as binary without actual conversion like Python's `0b` are also not allowed. The focus is to take input, make a converter, then output the result.</s> (Won't be in the final draft) - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language. # Test Cases ```none n = 0 Output: 0 n = 1 Output: 1 n = 5 Output: 101 n = 12 Output: 1100 n = 31 Output: 11111 n = 4096 Output: 1000000000000 ```
#11: Post edited
- # Challenge
- What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of a non-negative decimal integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.](https://codegolf.codidact.com/comments/thread/4166#comment-12893)- Adding to the disallowed converters, any built-in method that formats the variable as binary without actual conversion like Python's `0b` are also not allowed. The focus is to take input, make a converter, then output the result.- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
- # Challenge
- What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of a non-negative decimal integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - <s>Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.](https://codegolf.codidact.com/comments/thread/4166#comment-12893)</s> (Won't be in the final draft)
- - <s>Adding to the disallowed converters, any built-in method that formats the variable as binary without actual conversion like Python's `0b` are also not allowed. The focus is to take input, make a converter, then output the result.</s> (Won't be in the final draft)
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
#10: Post edited
- # Challenge
- What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- Take input of a non-negative integer and output its binary value/form.- - Any preceding zeros don't need to be outputted.
- - Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.](https://codegolf.codidact.com/comments/thread/4166#comment-12893)
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
- # Challenge
- What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of a non-negative decimal integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.](https://codegolf.codidact.com/comments/thread/4166#comment-12893)
- - Adding to the disallowed converters, any built-in method that formats the variable as binary without actual conversion like Python's `0b` are also not allowed. The focus is to take input, make a converter, then output the result.
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
#9: Post edited
- # Challenge
What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.- - Take input of a non-negative integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.](https://codegolf.codidact.com/comments/thread/4166#comment-12893)
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
- # Challenge
- What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of a non-negative integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.](https://codegolf.codidact.com/comments/thread/4166#comment-12893)
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
#7: Post edited
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- Take input of an integer and output its binary value/form.- - Any preceding zeros don't need to be outputted.
- - Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.](https://codegolf.codidact.com/comments/thread/4166#comment-12893)
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
n = <any negative integer>Output: Whatever you want, could be 0.- ```
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of a non-negative integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.](https://codegolf.codidact.com/comments/thread/4166#comment-12893)
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
#6: Post edited
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of an integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- n = <any negative integer>
- Output: Whatever you want, could be 0.
- ```
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of an integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.](https://codegolf.codidact.com/comments/thread/4166#comment-12893)
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- n = <any negative integer>
- Output: Whatever you want, could be 0.
- ```
#5: Post edited
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of an integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- n = <any negative integer>
- Output: Whatever you want, could be 0.
- ```
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of an integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - Suggested by [**@celtschk**](https://codegolf.codidact.com/users/8056): [Converters that simply take the inputted number as binary without changing the input itself aren't allowed.
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- n = <any negative integer>
- Output: Whatever you want, could be 0.
- ```
#4: Post edited
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of an integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of an integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 0
- Output: 0
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- n = <any negative integer>
- Output: Whatever you want, could be 0.
- ```
#3: Post edited
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- Take input of an integer named $n$ and output its binary value/form.- - Any preceding zeros don't need to be outputted.
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of an integer and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
#2: Post edited
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- Take input of an integer named $n$ and output its binary value.- - Any preceding zeros don't need to be outputted.
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
- # Challenge
- What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value.
- - Take input of an integer named $n$ and output its binary value/form.
- - Any preceding zeros don't need to be outputted.
- - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language.
- # Test Cases
- ```none
- n = 1
- Output: 1
- n = 5
- Output: 101
- n = 12
- Output: 1100
- n = 31
- Output: 11111
- n = 4096
- Output: 1000000000000
- ```
#1: Initial revision
Make my value binary
# Challenge What's do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value. - Take input of an integer named $n$ and output its binary value. - Any preceding zeros don't need to be outputted. - This is <a class="badge is-tag">code-golf</a>, so the shortest program wins. Yep, not by language. # Test Cases ```none n = 1 Output: 1 n = 5 Output: 101 n = 12 Output: 1100 n = 31 Output: 11111 n = 4096 Output: 1000000000000 ```