Search:

Type: Posts; User: Roadrunner2015

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. makes sense, but leaves me with the question of...

    makes sense, but leaves me with the question of how do i make a generalized function to mask the exp bits or frac bits when I don't know beforehand how many bits there are to be masked.
  2. still playing around with it.... it seems as...

    still playing around with it.... it seems as though the left shifts are shifting past the amount of bits there are supposed to be.

    i.e. 1 sign 2 exp 2 frac

    1 00 00

    if i...
  3. x is value y is number of exp bits z is number...

    x is value
    y is number of exp bits
    z is number of frac bits



    unsigned getExp(unsigned x, unsigned y, unsigned z) {
    x = (x << 1); // trying to clear out sign bit
    x = (x...
  4. im shifting > to try and clear out all...

    im shifting << then >> to try and clear out all bits that I don't care about but it seems as though they aren't being padded with 0's. These are unsigned numbers.
  5. Masking a bit string of unknown size

    I have an assignment where I am trying to get the frac bits of a IEEE number representation. The number of exp and frac bits are given as parameters from the main, but I am unsure what bit mask to...
  6. Replies
    3
    Views
    742

    Thank you very much for taking the time to...

    Thank you very much for taking the time to answer. I am embarrassed to say the problem was my lack of focus while reading. The bias in this assignment was 7, not 127. Diving by 7 resulted in no...
  7. Replies
    3
    Views
    742

    Can't hold enough decimal places

    Hello, and sorry if this is a question that should be known. I am writing a function to give me the value of an IEEE-floating point denormalized number. The problem I am running into is the 2E, E...
  8. Replies
    6
    Views
    2,265

    Thank you, this is the second time I've made this...

    Thank you, this is the second time I've made this mistake. I need to pay attention to the details more. Thank you again, though.
  9. Replies
    6
    Views
    2,265

    258 little endian big endian

    Hello, I am getting different answers than my professor on my review and was wondering if someone could explain to me either what I'm doing wrong, or can confirm that I'm doing it correctly.

    The...
  10. This! Thank you. And I understand the reasoning...

    This! Thank you. And I understand the reasoning for the whole (char *) deal, in my words it's to give rule on how this code should be read. The machines, I assume, write AND read in the same...
  11. deleted

    deleted
  12. [Big Endian vs Little Endian] Review Problem

    Assuming sizeof(int) = 4 ::

    My question is what 'y' would be following the code

    int x = 0x1234567;
    char *p = (char *)&x;
    int y = (int)(*p);

    (a) On a little endian machine
    (b) On a big...
  13. Replies
    7
    Views
    681

    Which is more efficient?

    Which is more efficient and why?

    int a, *p=&a, i;

    for(a=0,i=0;i < 10000; i++) a=a+1;

    or

    for(*p=0,i=0; i < 10000; i++) *p=*p+1;
  14. Replies
    1
    Views
    995

    nvm, figured it out. I had to reset where my...

    nvm, figured it out. I had to reset where my cursor pointer was before i started the loop again :wink: cheers for fixing a head ache
  15. Replies
    1
    Views
    995

    Linked list print help

    Just placed 1 into cp->element.
    cp -> element is now 1
    Try 1: 1 integer in this set
    A = {}

    Just placed 2 into cp->element.
    cp -> element is now 2
    Try 2: 2 integers in...
  16. Replies
    8
    Views
    798

    would it be better to use char *str or an array...

    would it be better to use char *str or an array of characters? (str[xxx])
  17. Replies
    8
    Views
    798

    here would be my stack after pushing and...

    here would be my stack after pushing <title> and <b>

    -
    -
    -
    <b>
    <title>


    I now come across </title> (its wrong!) and i pop the stack..... so from there do i strtok() the '/' out of...
  18. Replies
    8
    Views
    798

    I don't see the difference in comparing ...

    I don't see the difference in comparing

    <title><b>Hey</b></title>

    with

    <title><b>Hey</title></b>


    I understand that they are obviously different and the second example being wrong......
  19. Replies
    8
    Views
    798

    I'm not sure how I could distinguish between a...

    I'm not sure how I could distinguish between a one sided tag and an open or close tag when coming across the first <?

    Also, I am not sure how to check.. lets say... if the first <title> tag...
  20. Replies
    8
    Views
    798

    Checking balance of nested < >'s

    Hello I had a quick question about how to check the balance of brackets in an HTML file using a stack (pushing and popping). I understand pushing and popping. I get lost when it comes to the logic of...
  21. Replies
    8
    Views
    995

    Laserlight caught this, was an accident from...

    Laserlight caught this, was an accident from editing my code before.

    I checked in main.

    True, will have to fix. Although I do believe they are all working so I don't think that is the stack...
  22. Replies
    8
    Views
    995

    whoops, i had re-done my code and i guess forgot...

    whoops, i had re-done my code and i guess forgot that line. Thanks for the catch. Any idea on the stack smash though?
  23. Replies
    8
    Views
    995

    *** stack smashing detected ***: ./driver...

    *** stack smashing detected ***: ./driver terminated
    ======= Backtrace: =========
    /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7f79da8]...
  24. Replies
    8
    Views
    995

    *stack smash* Buffer Overflow?

    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #define MAX 100
    #define MAX_WORD 50

    static char* array[MAX];
    static int max_lines;

    void InitDictionary(FILE *possible_words){
  25. My structure is typedef struct { string...

    My structure is


    typedef struct {
    string name;
    string title;
    string ssnum;
    double salary;
    int withholding;
    } employeeRecordT;
Results 1 to 25 of 75
Page 1 of 3 1 2 3