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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

pascal algorithims

  • 12-01-2005 7:16pm
    #1
    Registered Users, Registered Users 2 Posts: 618 ✭✭✭


    looking for a few pascal algorithims can anyone help??
    1.an algorithim to convert a given decimal number to binary then hex notation.
    2.an algorythim to calculate the number of bits in any given file size(byte,MB,GB,TB,EB).
    3.an algorithim to calculate the time in seconds it will take to send a file across each of the main comms links(modem,ISDN BRI and E1).
    4.an algorithim to emulate the router operation of calculating the network address by performing the logical AND calculation upon any given IP address and subnet mask.
    If anyone can help on these it d be great even a few pointers would help cheers. JK.


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Doing homework there, Johnny boy?

    An algorithm is a set of steps for getting something done, its not written in any particular language (unless you define logic as a language). What you seem to be looking for is Pascal code...


  • Registered Users, Registered Users 2 Posts: 618 ✭✭✭CrazySka


    not quite so much code just the order of how the code would be presented if written in pascal but written in plain english thats what im looking for.
    its a big ask but maybe someone knows the best way of doing it


  • Closed Accounts Posts: 920 ✭✭✭elvis2002


    so your looking for psudeocode?


  • Registered Users, Registered Users 2 Posts: 618 ✭✭✭CrazySka


    yeah i suppose you d call it psuedocode


  • Closed Accounts Posts: 82 ✭✭cyberbob


    pseudo code has been discussed here before .
    someone didnt read the charter
    http://www.boards.ie/vbulletin/showthread.php?t=200380&highlight=pseudo+code


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 950 ✭✭✭jessy


    Google is probable you’re most useful tool here, try searching from algorithms there.
    A first Step (Found by Google)

    Decimal to Binary algorithm

    start
    1.let num be an array of integer
    2.input no.
    3.let rem=0,ctr=0
    4.while(rem!=1)
    begin
    q=no/2
    rem=no mod 2
    num[ctr]=rem
    ctr++
    no=q
    end
    5.while(ctr>=0)
    begin
    print num[ctr]
    ctr=ctr-1
    end
    end


Advertisement