Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,885 questions

51,811 answers

573 users

How to print binary number hex value in Python

2 Answers

0 votes
print(int('00', 2))
print(int('01', 2))
print(int('10', 2))
print(int('11', 2))


'''
run:
 
0
1
2
3
 
'''

 



answered Jun 21, 2018 by avibootz
0 votes
print(int('0000', 2))
print(int('0001', 2))
print(int('0010', 2))
print(int('0011', 2))
print(int('1111', 2))
print(int('11111111', 2))


'''
run:
 
0
1
2
3
15
255
 
'''

 



answered Jun 22, 2018 by avibootz

Related questions

1 answer 166 views
1 answer 118 views
2 answers 158 views
1 answer 97 views
97 views asked Mar 26, 2023 by avibootz
1 answer 106 views
2 answers 174 views
174 views asked Feb 15, 2020 by avibootz
1 answer 163 views
...