23.03.2022, 05:21
(This post was last modified: 23.03.2022, 09:21 by phongvucba.)
Hi guys !
I have a little problem, I have 3 problems, please help! :
- I want to convert Decimal value to binary, or Hex to binary.
Example: Number 5000 converts to 0001 0011 1000 1000, suppose assigning to string b='0001 0011 1000 1000'
- After getting string b, we can read the value of each bit in string b (read each position from bit 0 to bit 15).
For example, for the string b='0001 0011 1000 1000', I read bits from right to left, the 4th place is "1", the 10th and 11th places are "1" and "0".
for the string b='0001 0011 1000 1000', I also want to read the ordinal bits, the 9th and 10th and 11th positions are "111", the 3rd and 4th positions are "10"
How can I do this?
This is "how to convert dec to bin"
https://www.rapidtables.org/vi/convert/n...inary.html
- I have the string b='0001 0011 1000 1000'. I want to record the 4th value =1 (from right to left) as =0 . What should I do .After assigning I want to convert this string to decimal number
Thank you very much everyone!
I have a little problem, I have 3 problems, please help! :
- I want to convert Decimal value to binary, or Hex to binary.
Example: Number 5000 converts to 0001 0011 1000 1000, suppose assigning to string b='0001 0011 1000 1000'
- After getting string b, we can read the value of each bit in string b (read each position from bit 0 to bit 15).
For example, for the string b='0001 0011 1000 1000', I read bits from right to left, the 4th place is "1", the 10th and 11th places are "1" and "0".
for the string b='0001 0011 1000 1000', I also want to read the ordinal bits, the 9th and 10th and 11th positions are "111", the 3rd and 4th positions are "10"
How can I do this?
This is "how to convert dec to bin"
https://www.rapidtables.org/vi/convert/n...inary.html
- I have the string b='0001 0011 1000 1000'. I want to record the 4th value =1 (from right to left) as =0 . What should I do .After assigning I want to convert this string to decimal number
Thank you very much everyone!