Ask Your Question
1

dvojkova vs desiatkova sustava

asked 2014-12-01 11:45:36 +0100

mikitrom gravatar image

updated 2014-12-01 11:52:30 +0100

Josef Kokeš gravatar image

ako vysledok nejakej operacie zapisat v inej sustave ... pouziva sa 10# pre desiatkovu a 2# pre dvojkovu atd ale ako to prepojit s vyrazom ? vopred dakujem

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
1

answered 2014-12-01 11:52:22 +0100

Josef Kokeš gravatar image

Musíte použít nějaký nástroj, který to umí, shell sám o sobě to nedokáže (dokáže si poradit se soustavami na vstupu, ale ne na výstupu). Na přednášce to bylo ukázané s bc, viz přednáška 9 strana 7.

edit flag offensive delete publish link more

Comments

2

Například sage -c 'print 28.digits(base=3)' vrátí [1, 0, 0, 1].

Tomáš Kalvoda ( 2014-12-01 17:18:31 +0100 )edit

@Tomáš Kalvoda +1 :-)

VojtechMyslivec ( 2014-12-01 21:44:49 +0100 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

Add answer

[hide preview]

Stats

Asked: 2014-12-01 11:45:36 +0100

Seen: 262 times

Last updated: Dec 01 '14