| def dec_to_binary( |
| ) |
Return binary from decimal number(n).
| def dec_to_two( |
| ) |
Return two's complement from decimal number(n).
| def binary_to_dec( |
| ) |
Return decimal from two's complement number.
| def normalizelen( |
| ) |
Return (a,b) normalized.
| def is_greater( |
| ) |
Return 1 if a > b, return 0 else.
| def binary_reverse( |
| ) |
Return reverse binary number.
| def binary_sum( |
| ) |
Return a+b.
| def binary_sub( |
| ) |
Return a-b.
| def binary_multiply( |
| ) |
Return a*b.
| def binary_div( |
| ) |
Return a/b if a >= b, return 0 else.
| def is_binary( |
| ) |
Return 1 if str is binary, return 0 else.
| def is_name( |
| ) |
Return 1 if str is an operator, return 0 else.
| def peek( |
| ) |
Return stack[-1] if stack is not empy else return None.
| def apply_operator( |
| ) |
Function that append operation result in values stack.
| def greater_precedence( |
| ) |
Function that return precedences operator.
| def evaluate( |
| ) |
Evaluate expression and return result. (Implementation of shunting-yard algorithm)