Solved

how many different numbers can six bits represent?

Posted on 2006-07-20
10
395 Views
Last Modified: 2012-06-21
Does any body know how many different numbers can six bits represent?
0
Comment
Question by:amoe
10 Comments
 
LVL 35

Assisted Solution

by:Raynard7
Raynard7 earned 50 total points
Comment Utility
64 (including 0)

2^6
0
 

Author Comment

by:amoe
Comment Utility
how do i convert 7Bh to decimal?
0
 
LVL 5

Expert Comment

by:Davidshc76
Comment Utility
0
 
LVL 14

Expert Comment

by:CyrexCore2k
Comment Utility
Programatically?

Function HexToInt(sStr)
Dim iInt, temp, x
iInt = 0
For x = 1 To Len(sStr)
    temp = Val(Mid(sStr, x, 1))
    If temp = 0 And Mid(sStr, x, 1) <> "0" Then
        If UCase(Mid(sStr, x, 1)) = "A" Then
            temp = 10
        ElseIf UCase(Mid(sStr, x, 1)) = "B" Then
            temp = 11
        ElseIf UCase(Mid(sStr, x, 1)) = "C" Then
            temp = 12
        ElseIf UCase(Mid(sStr, x, 1)) = "D" Then
            temp = 13
        ElseIf UCase(Mid(sStr, x, 1)) = "E" Then
            temp = 14
        ElseIf UCase(Mid(sStr, x, 1)) = "F" Then
            temp = 15
        End If
    End If
    temp = temp * (16 ^ (Len(sStr) - x))
    iInt = iInt + temp
Next
HexToInt = iInt
End Function
0
 
LVL 4

Accepted Solution

by:
v_karthik earned 50 total points
Comment Utility
>>how do i convert 7Bh to decimal?

you mean manually? Just write down the bits representing 7 and B side by side like this

0111 1011

(note: 7 is 0111, B is 1011 or 11 in decimal)

Now read the binary in decimal (hope u know that), it becomes 123.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 15

Expert Comment

by:Ryan_R
Comment Utility
1 bit (as a 1 or a 0)
8 bits (1 byte) = 1 character
therefore 6 bits isn't enough to represnt any characters - you need multiples of 8
0
 
LVL 25

Expert Comment

by:InteractiveMind
Comment Utility
> therefore 6 bits isn't enough to represnt any characters

For standard character encodings, you are correct.
But if he's implementing his own format, then there's no problem (so long as he can represent those 6 bits).
0
 
LVL 15

Expert Comment

by:Ryan_R
Comment Utility
fair enough, is there any really good reason why this is needed (whats wrong with standard chars?)
0
 
LVL 25

Expert Comment

by:InteractiveMind
Comment Utility
Well, if there's only a limited number of characters that need representing, then by using 6 bits instead of 8, you will be of course saving 2 bits per character.

When memory is a *major* issue, and you need to represent a very large number of characters, then this small sacrifice is somewhat significant.

But it's unlikely that you will ever be in that situation nowadays; so really, no.. I personally cannot think of any good reason why you wouldn't just stick with the standard character encodings (or at least use an 8-bit byte, which the low-level architecture directly supports; rather than trying to implement your own format).
0
 
LVL 15

Expert Comment

by:Ryan_R
Comment Utility
thanks - i was thinking on similar lines as you
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
zeroFront challenge 7 70
wordcount challenge 11 72
How  do I get an older program to run in Windows 10? 20 79
move one pixel 4 38
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now