게시판 인덱스

 
 FAQFAQ   검색검색   멤버리스트멤버리스트   사용자 그룹사용자 그룹   사용자 등록하기사용자 등록하기 
 개인 정보개인 정보   비공개 메시지를 확인하려면 로그인하십시오비공개 메시지를 확인하려면 로그인하십시오   로그인로그인 

실습 5번 질문입니다.

 
글 쓰기   답변 달기     게시판 인덱스 -> 4190.210 Principles of Programming (Fall 2012)
이전 주제 보기 :: 다음 주제 보기  
글쓴이 메시지
조현창



가입: 2012년 9월 7일
올린 글: 8

올리기올려짐: 2012년10월27일 4:07    주제: 실습 5번 질문입니다. 인용과 함께 답변

코드:
(define w1 (make-wire "w1"))
(define w2 (make-wire "w2"))
(define w3 (make-wire "w3"))
(define and1 (and-gate w1 w2 w3))
(define not1 (not-gate w3 w1))
(define switch1 (switch w2))
(define circuit1 (add-gate-to-circuit "and1" and1 empty-circuit))
(define circuit2 (add-gate-to-circuit "not1" not1 citcuit1))
(define circuit3 (add-gate-to-circuit "switch1" switch1 circuit2))
(define circuit-state
(set-wire-volts
(list (cons "w1" zero) (cons "w2" zero) (cons "w3" one))
circuit3))
(print (run circuit-state 3))
> w1 0
> w2 1
> w3 0


문서의 예제인데요
답이 w1 1 / w2 0 / w3 0 아닌가요?
위로
사용자 정보 보기 비밀 메시지 보내기
최민아



가입: 2009년 9월 28일
올린 글: 236

올리기올려짐: 2012년10월27일 16:25    주제: 인용과 함께 답변

코드:
(define w1 (make-wire "w1"))
(define w2 (make-wire "w2"))
(define w3 (make-wire "w3"))
(define and1 (and-gate w1 w2 w3))
(define not1 (not-gate w3 w1))
(define switch1 (switch w2))
(define circuit1 (add-gate-to-circuit "and1" and1 empty-circuit))
(define circuit2 (add-gate-to-circuit "not1" not1 citcuit1))
(define circuit3 (add-gate-to-circuit "switch1" switch1 circuit2))
(define circuit-state
  (set-wire-volts
    (list (cons w1 one) (cons w2 one) (cons w3 zero))
    circuit3))
(print (run circuit-state 3))


으로 테스트셋을 수정하였습니다. 죄송합니다.
위로
사용자 정보 보기 비밀 메시지 보내기
이전 글 표시:   
글 쓰기   답변 달기     게시판 인덱스 -> 4190.210 Principles of Programming (Fall 2012) 시간대: GMT + 9 시간(한국)
페이지 11

 
건너뛰기:  
새로운 주제를 올릴 수 없습니다
답글을 올릴 수 없습니다
주제를 수정할 수 없습니다
올린 글을 삭제할 수 없습니다
투표를 할 수 없습니다


Powered by phpBB 2.0.21-7 (Debian) © 2001, 2005 phpBB Group
Translated by kss & drssay