Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    4
    ReputationRep:
    Someone teach me a bit of computer science- hexadecimals
    I’ve got a exam this week and I was absent the lesson for hexadecimals, even though my teacher had explained it to me I still didn’t get it and I’ve been searching on the internet and nothings really helping can someone tell me how to work it all out
    Posted on the TSR App. Download from Apple or Google Play
    Offline

    21
    ReputationRep:
    (Original post by rummaysiauddin)
    Someone teach me a bit of computer science- hexadecimals
    I’ve got a exam this week and I was absent the lesson for hexadecimals, even though my teacher had explained it to me I still didn’t get it and I’ve been searching on the internet and nothings really helping can someone tell me how to work it all out
    It's base 16, with the digits representing 10-15 written as a-f, so that they're single characters. Often, hex numbers are prefixed with '0x' to signal that it's base 16.

    For example, 0xfa2b in decimal would be 11 + 2*2^4 + 10*2^8 + 15*2^{12}=64,043 (b=11, a=10, f=15)

    Assuming that you've already done binary, then conversion between the two is easy, as each group of 4 bits represents one hex digit.
    Offline

    14
    ReputationRep:
    An easy way of converting to hex is by getting the denary into binary form (or starting from binary form) and splitting nibbles. For example

    01100001
    becomes
    1110 0001

    the left nibble contains 4 + 2 = 6, and the right contains 1.
    Therefore that byte is [14, 1] in hex which is [E 1]

    From 0-9 the numbers represent exactly the denary value they hold, after that they represent letters (up to 15 since that is the max value a nibble can hold), with 10 = A, 11 = B and so on. F is the hex value.
 
 
 
Poll
Do you agree with the PM's proposal to cut tuition fees for some courses?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.