Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Logic, Bytes and Hexadecimal

Options
  • 10-11-2009 8:31pm
    #1
    Registered Users Posts: 8,004 ✭✭✭


    Hi Folks,

    I've read up a fair bit on this but I must be missing something. I'm looking at a page of data from a 512 bit memory. This memory is divided into 16 pages with 4 bytes in each.

    Now, each of these 4 bytes has 8 bits. So eight 1's and 0's I presume which represent a logic state.

    However, when I read one of these pages I get a hex string:
    9E 48 F0 00 FF FF FF FF E5 F3 E5 32 01 A9 41 02
    

    So would I be right in saying "01 A9 41 02" represents one byte so 8 bits?

    And how do I read the logic state of each bit?

    :confused:

    Many Thanks!


Comments

  • Registered Users Posts: 1,916 ✭✭✭ronivek


    There's plenty out there to help you here; the first Google result for "digital number system" for example.

    Effectively you're not getting the representation of data in a digital system. At it's lowest level you're representing data as binary; i.e. a sequence of 1s and 0s.

    Four binary digits are equivalent to a single hexadecimal value; 1-F (1,2,3,4,5,6,7,8,9,A,B,C,D,E,F).

    So if you have five hexadecimal digits; they're represented by (5 * 4) = 20 binary digits.

    The example you've posted; "01 A9 41 02"; is therefore equivalent to 32-bits.
    And how do I read the logic state of each bit?

    Well; a single hex digit maps onto four binary digits and each binary digit is equivalent to a true or false value. For example F is equivalent to 1111, 3 is equivalent to 0011 etc. Assembly/most languages have bitwise operators which allow you to shift bits left and right; or the use a mask to determine if a specific value is set. Some languages will allow you to test whether a specific bit within a register/value is set or not.


  • Registered Users Posts: 8,004 ✭✭✭ironclaw


    ronivek wrote: »
    There's plenty out there to help you here; the first Google result for "digital number system" for example.

    Effectively you're not getting the representation of data in a digital system. At it's lowest level you're representing data as binary; i.e. a sequence of 1s and 0s.

    Four binary digits are equivalent to a single hexadecimal value; 1-F (1,2,3,4,5,6,7,8,9,A,B,C,D,E,F).

    So if you have five hexadecimal digits; they're represented by (5 * 4) = 20 binary digits.

    The example you've posted; "01 A9 41 02"; is therefore equivalent to 32-bits.

    Ok, that makes sense. Thanks for that. But would that not mean I have too many bits? The memory only holds 512 bits, which if spread over 16 pages, means there is a maximum of 32 bits per page. But if that string above has 128bits how does that work?

    For reference, the devices I'm doing the project work with: http://www.nxp.com/acrobat/other/identification/M028634_MF0ICU1_Functional_Spec_V3.4.pdf


  • Registered Users Posts: 1,916 ✭✭✭ronivek


    According to the specifications the READ command returns 4 full pages from a given starting address; 4 full pages being 128 bits which is equivalent to the data you have in your post.


  • Registered Users Posts: 8,004 ✭✭✭ironclaw


    I actually noticed that last night. I was commanding a 4 byte read. I misread the command as a 4 bit read, so in essence I was taking four full pages instead of 4 areas of the one page. My mistake entirely.

    Thanks for all the help!


Advertisement