I've got a question for you. (2024)

Number System Conversions

When writing programs for microcontrollers we’re usually stuck dealing with 3 different number systems: decimal, binary and hexadecimal (or hex). We use decimal because it comes naturally; that’s the way we count. Unfortunately, it’s not how computers count. Since computers and microcontrollers are limited to 1’s and 0’s, they count using sequences of these numbers. This is the binary number system. Binary numbers are usually prefixed with the '0b' characters which are not part of the number. Sometimes they are also subdivided into groups of 4 digits to make them easier to read as well as easier to relate to the hexadecimal number system. An example of a binary number is 0b0100.1011. The periods in the number don't represent anything, they just make it easier to read the number.

The binary system is simple to understand, but it takes a lot of digits to use the binary system to represent large numbers. The hexadecimal system can represent much larger numbers using fewer characters, and it closely resembles binary numbers. Hexadecimal numbers are usually prefixed with the characters '0x' which are not part of the number. A single hexadecimal digit can represent four binary digits!

Binary numbers can only consist of 1’s and 0’s; typically a binary number consists of 8 digits (or some multiple of 8) if it’s being used in some kind of a computer (or microcontroller). It’s useful to know how to convert a binary number into a decimal number and vice versa. So how do we convert between number systems? First consider how we determine the value of a decimal number. The number 268 can be broken down as 200 + 60 + 8, or 2 * (10^2) + 6 * (10^1) + 8 * (10^0). There are two important numbers that we have to know to ‘deconstruct’ the number - the base of the number system and the location of the digit within the number. The base of a decimal number is 10. When we’re converting the number 268, 2 is the second digit, 6 is the first digit and 8 is the zero digit. Each digit has to be scaled according to its place within the number. The scale of the digit is the base of the number system raised to the power of the digit's location in the number. So each number is scaled, and then all of the scaled digits are added to find the total value of the number.

The same method can be used to find the value of a binary number. For example, let’s look at the number 0b1011.0101. The base of the binary system is 2 (the prefix 0b is often used in code to indicate that the number is in the binary format). The value of our number is: 1*(2^7)+0*(2^6)+1*(2^5)+1*(2^4)+0*(2^3)+1*(2^2)+0*(2^1)+1*(2^0), which is equal to 181.

0b1011.0101. What a completely inefficient way of typing a number! But we can represent the same binary number using only 2 hexadecimal digits. First though, we'll start by converting a hexadecimal (hex) number to decimal like we did for a binary number. How about 0xB5? Wait, what?! The prefix 0x is used in code to indicate that the number is being written in hex. But what is ‘B’ doing in there? The hexadecimal format has a base of 16, which means that each digit can represent up to 16 different values. Unfortunately, we run out of numerical digits after ‘9,’ so we start using letters. The letter ‘A’ represents 10, ‘B’ is 11, ‘C’ is 12, ‘D’ is 13, ‘E’ is 14 and ‘F’ is 15. ‘F’ is the largest digit in the hex numbering system. We convert the number the same way as before. The value of 0xB5, then, is: B*(16^1)+5*(16^0) or 181.

Knowing how to convert binary and hex to decimal is important, but the most useful number conversion is probably converting between hex and binary. These two numbering systems actually work pretty well together. The numbering systems happen to be related such that a single hex digit represents exactly 4 binary digits, and so 2 hex digits can represent 8 bits (or binary digits). Here’s a table that shows how each hex digit is related to the binary system:

Binary ValueHex Value
00000
00011
00102
00113
01004
01015
01106
01117
10008
10019
1010A
1011B
1100C
1101D
1110E
1111F

For example, to convert the hex number 0x1C to binary, we would find the corresponding binary value for 1 and C and combine them. So, 0x1C in binary is 0b0001.1100. If we wanted to figure out the hex value for a binary number we just go the other way. To find the hex representation of the binary number 0b0010.1011 we first find the hex value for 0010, then the hex value for 1011 and combine them; the hex value would be 0x2B.

There are many free tools available to help convert between these numbering systems, just google 'hex number conversion.' If you use Windows as an operating system you have a great tool built into the calculator. Just change the calculator to scientific mode and you can convert between number systems by typing a number then changing the format of the calculator!

I've got a question for you. (2024)

FAQs

What to reply when someone says I have a question for you? ›

When someone asks you a question, you should be sure you understand exactly what they want to know. Consider rewording their question and asking it back to them by saying something like: "What you're asking is..." "From my understanding, you want to know..."

How do you answer the question have you got? ›

Yes, I/you/we/they have. No, I/you/we/they haven't. Yes, he/she/it has. No, he/she/it hasn't.

How to reply when someone answers your question? ›

A simple and effective way to respond is to thank the person for their time and effort in answering your question. You can say something like "Thank you so much for taking the time to answer my question. Your response was really helpful. You can say something like "I really appreciate your perspective on this issue.

How to answer "I have a question, can you help"? ›

"Sure, what's your question?" you can say. or "Ask away, I'm happy to assist." "Sure, what's your question?" you can say, or "Ask away, I'm here to help."

What to say when someone says can I ask you a question? ›

When someone asks "may I ask you something" in a formal way, you can reply with a polite response such as "of course", "certainly", or "yes, please go ahead". Explanation: This response acknowledges the person's request and grants them permission to ask their question.

What does I've got a question mean? ›

So, I have got a question can mean both I have a question and I have received a question.

How do you respond when someone says I got you? ›

It's a sign that that person wants to have your back. They want to help you in other words. Just say thank you! Or if you do not want them to get you in the even of like paying for you or something like that, say “ I appreciate that but no thank you!”

How to respond to "have you got"? ›

"Have you got it?" is pretty informal and slangy, so this US English speaker would feel fine responding with the informal, "Yes, we got it" or just "We got it" or even just "Got it." Generally, either Yes, we got it or Yes, we've got it are always interchangeable.

How do you respond correctly? ›

Speak directly and clearly when you respond.
  1. Make sure they're paying attention to you so you don't have to repeat yourself.
  2. Recognize if someone else wants to speak and allow them room to talk as well.
  3. Allow the person to respond to what you've said as well.

What is the reply answer? ›

answer, response, reply, rejoinder, retort mean something spoken, written, or done in return. answer implies the satisfying of a question, demand, call, or need.

How to avoid answering a question? ›

Saying “No”
  1. I'm sorry, but I'd prefer not to say.
  2. I'm sorry, but I don't want to share that information.
  3. I don't mean to be rude, but I don't want to answer that question.
  4. No offense, but I'd rather not say.
  5. Let's just say it cost more than my old one. ...
  6. All I will say is that both sides are happy with the result.
Apr 3, 2023

What's up answer flirty? ›

11 Flirty Responses to “What's Up?”
  • Better now that I'm hearing from you! ...
  • Feeling pretty beautiful/handsome today, but not as beautiful/handsome as you are!
  • I'm really busy, but counting down the hours until (insert the date when you'll see them again).
  • I was just thinking of you and wondering how you look today.
Oct 27, 2021

What to say when someone doesn't answer your question? ›

You could ask them if they have seen your question and if they have, let them know you have been wondering why they haven't answered. They might've missed it, something might be going on for them or they've felt uncomfortable answering that question. Either way, getting an answer will help you take it from there.

How do you respond to a question you don't have an answer to? ›

  1. Verify Your Understanding. Verify and then be honest before answering. ...
  2. Give A Follow-Up Date. The best way to respond includes honesty. ...
  3. Offer To Find The Answer. There's no shame in admitting you don't have all the answers. ...
  4. Ask Someone Else. ...
  5. Work Through The Question. ...
  6. Let Them Know You're Actively Researching.
May 25, 2022

How do you respond to a May I question? ›

Yes I can/Yes, sure thing. Yes of course!/Of course I will. Yes I can. It's this way.

How do you tell someone you have a question for them? ›

Other ways to say “I Have a Question”
  1. Can I ask something? Example: “I'm not sure about this concept. ...
  2. Can you clarify? Example: “The details seem a little incorrect. ...
  3. I'm curious about… Example: “I'm curious about how this process works. ...
  4. Would you mind elaborating? Example: “That is an interesting question.
Sep 27, 2023

How to respond to "Does that make sense?"? ›

Some examples of how you could reply are:
  1. "Yes, it makes sense, thank you for explaining."
  2. "I think I understand, let me know if I have any questions."
  3. "Got it, thanks for clarifying."
  4. "Yes, I follow you."
  5. "I understand, thank you."
Jan 26, 2023

Top Articles
Latest Posts
Article information

Author: Van Hayes

Last Updated:

Views: 6023

Rating: 4.6 / 5 (46 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Van Hayes

Birthday: 1994-06-07

Address: 2004 Kling Rapid, New Destiny, MT 64658-2367

Phone: +512425013758

Job: National Farming Director

Hobby: Reading, Polo, Genealogy, amateur radio, Scouting, Stand-up comedy, Cryptography

Introduction: My name is Van Hayes, I am a thankful, friendly, smiling, calm, powerful, fine, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.